You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by pv...@apache.org on 2021/06/16 11:42:21 UTC
[nifi] branch main updated: NIFI-8709 - added XSAnyImpl in
attribute check for group
This is an automated email from the ASF dual-hosted git repository.
pvillard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 520ee82 NIFI-8709 - added XSAnyImpl in attribute check for group
520ee82 is described below
commit 520ee8274513abda923b2a61863a3e7c6edfc049
Author: Abhishek Kumar <>
AuthorDate: Wed Jun 16 08:39:25 2021 +0530
NIFI-8709 - added XSAnyImpl in attribute check for group
Signed-off-by: Pierre Villard <pi...@gmail.com>
This closes #5164.
---
.../apache/nifi/web/security/saml/impl/StandardSAMLService.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/saml/impl/StandardSAMLService.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/saml/impl/StandardSAMLService.java
index d1a1e97..bbcff0c 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/saml/impl/StandardSAMLService.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/main/java/org/apache/nifi/web/security/saml/impl/StandardSAMLService.java
@@ -36,6 +36,7 @@ import org.opensaml.saml2.metadata.provider.MetadataProviderException;
import org.opensaml.xml.XMLObject;
import org.opensaml.xml.encryption.DecryptionException;
import org.opensaml.xml.schema.XSString;
+import org.opensaml.xml.schema.impl.XSAnyImpl;
import org.opensaml.xml.validation.ValidationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -375,8 +376,13 @@ public class StandardSAMLService implements SAMLService {
final String groupName = valueXSString.getValue();
LOGGER.debug("Found group {} for {}", groupName, userIdentity);
groups.add(groupName);
+ } else if (value instanceof XSAnyImpl) {
+ final XSAnyImpl valueXSAnyImpl = (XSAnyImpl) value;
+ final String groupName = valueXSAnyImpl.getTextContent();
+ LOGGER.debug("Found group {} for {}", groupName, userIdentity);
+ groups.add(groupName);
} else {
- LOGGER.debug("Value was not XSString, but was " + value.getClass().getCanonicalName());
+ LOGGER.debug("Value was not XSString and XSAnyImpl, but was " + value.getClass().getCanonicalName());
}
}
}