mirror of https://github.com/apache/nifi.git
NIFI-5972: Converting some warning log messages to debug as they could possibly be due to a valid scenario like NiFi users belonging to a group that is not relevant to NiFi.
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #3274.
This commit is contained in:
parent
410c9a4ecd
commit
531c84ac31
|
@ -506,7 +506,8 @@ public class LdapUserGroupProvider implements UserGroupProvider {
|
||||||
final Attribute attributeGroups = ctx.getAttributes().get(userGroupNameAttribute);
|
final Attribute attributeGroups = ctx.getAttributes().get(userGroupNameAttribute);
|
||||||
|
|
||||||
if (attributeGroups == null) {
|
if (attributeGroups == null) {
|
||||||
logger.warn("User group name attribute [" + userGroupNameAttribute + "] does not exist. Ignoring group membership.");
|
logger.debug(String.format("User group name attribute [%s] does not exist for %s. This may be due to "
|
||||||
|
+ "misconfiguration or the user may just not belong to any groups. Ignoring group membership.", userGroupNameAttribute, identity));
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
final NamingEnumeration<String> groupValues = (NamingEnumeration<String>) attributeGroups.getAll();
|
final NamingEnumeration<String> groupValues = (NamingEnumeration<String>) attributeGroups.getAll();
|
||||||
|
@ -562,7 +563,8 @@ public class LdapUserGroupProvider implements UserGroupProvider {
|
||||||
if (!StringUtils.isBlank(groupMemberAttribute)) {
|
if (!StringUtils.isBlank(groupMemberAttribute)) {
|
||||||
Attribute attributeUsers = ctx.getAttributes().get(groupMemberAttribute);
|
Attribute attributeUsers = ctx.getAttributes().get(groupMemberAttribute);
|
||||||
if (attributeUsers == null) {
|
if (attributeUsers == null) {
|
||||||
logger.warn("Group member attribute [" + groupMemberAttribute + "] does not exist. Ignoring group membership.");
|
logger.debug(String.format("Group member attribute [%s] does not exist for %s. This may be due to "
|
||||||
|
+ "misconfiguration or the group may not have any members. Ignoring group membership.", groupMemberAttribute, name));
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
final NamingEnumeration<String> userValues = (NamingEnumeration<String>) attributeUsers.getAll();
|
final NamingEnumeration<String> userValues = (NamingEnumeration<String>) attributeUsers.getAll();
|
||||||
|
@ -577,7 +579,8 @@ public class LdapUserGroupProvider implements UserGroupProvider {
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
groupToUserIdentifierMappings.computeIfAbsent(referencedGroupValue, g -> new HashSet<>()).add(user.getIdentifier());
|
groupToUserIdentifierMappings.computeIfAbsent(referencedGroupValue, g -> new HashSet<>()).add(user.getIdentifier());
|
||||||
} else {
|
} else {
|
||||||
logger.warn(String.format("%s contains member %s but that user was not found while searching users. Ignoring group membership.", name, userValue));
|
logger.debug(String.format("%s contains member %s but that user was not found while searching users. This may be due "
|
||||||
|
+ "to a misconfiguration or it's possible the user is not a NiFi user. Ignoring group membership.", name, userValue));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// since performUserSearch is false, then the referenced group attribute must be blank... the user value must be the dn
|
// since performUserSearch is false, then the referenced group attribute must be blank... the user value must be the dn
|
||||||
|
@ -621,8 +624,8 @@ public class LdapUserGroupProvider implements UserGroupProvider {
|
||||||
|
|
||||||
// any remaining groupDn's were referenced by a user but not found while searching groups
|
// any remaining groupDn's were referenced by a user but not found while searching groups
|
||||||
groupToUserIdentifierMappings.forEach((referencedGroupValue, userIdentifiers) -> {
|
groupToUserIdentifierMappings.forEach((referencedGroupValue, userIdentifiers) -> {
|
||||||
logger.warn(String.format("[%s] are members of %s but that group was not found while searching users. Ignoring group membership.",
|
logger.debug(String.format("[%s] are members of %s but that group was not found while searching groups. This may be due to a misconfiguration "
|
||||||
StringUtils.join(userIdentifiers, ", "), referencedGroupValue));
|
+ "or it's possible the group is not a NiFi group. Ignoring group membership.", StringUtils.join(userIdentifiers, ", "), referencedGroupValue));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// since performGroupSearch is false, then the referenced user attribute must be blank... the group value must be the dn
|
// since performGroupSearch is false, then the referenced user attribute must be blank... the group value must be the dn
|
||||||
|
|
Loading…
Reference in New Issue