[java-identity-provider] branch master updated: IDP-1217 More review comments
Rod Widdowson
rdw at steadingsoftware.com
Wed Jun 20 04:55:15 EDT 2018
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=dbf0e0327492bc30194a403b633ceccfc2d1a38b
The following commit(s) were added to refs/heads/master by this push:
new dbf0e03 IDP-1217 More review comments
dbf0e03 is described below
commit dbf0e0327492bc30194a403b633ceccfc2d1a38b
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Wed Jun 20 09:53:04 2018 +0100
IDP-1217 More review comments
https://issues.shibboleth.net/jira/browse/IDP-1217
- Widen the cases for not doing the mapping to include
an AttributeConsumerService which has a parent (inferring)
metadata and hence already scanned.
- It is quite acceptable to not have an AttributeConsumerServiceContext
(if there is no index and no default and no RequestedAttributes)
---
...questedAttributesInAttributeConsumingService.java | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/MapRequestedAttributesInAttributeConsumingService.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/MapRequestedAttributesInAttributeConsumingService.java
index bcf1727..3773ac1 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/MapRequestedAttributesInAttributeConsumingService.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/MapRequestedAttributesInAttributeConsumingService.java
@@ -103,31 +103,33 @@ public class MapRequestedAttributesInAttributeConsumingService extends AbstractP
protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
acsContext = attributeConsumingServiceContextLookupStrategy.apply(profileRequestContext);
- if (acsContext == null) {
- log.error("{} Unable to find AttributeConsumingServiceContext", getLogPrefix());
- ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX);
- return false;
- }
-
return true;
}
/** {@inheritDoc}*/
protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
+ if (acsContext == null) {
+ log.trace("{} AttributeConsumingServiceContext not found", getLogPrefix());
+ return;
+ }
+
final AttributeConsumingService acs = acsContext.getAttributeConsumingService();
if (acs == null) {
- log.trace("{} no acs to map", getLogPrefix());
+ log.trace("{} no AttributeConsumingService to map", getLogPrefix());
return;
}
if (acs.getRequestAttributes().isEmpty() ||
- acs.getObjectMetadata().containsKey(AttributesMapContainer.class)) {
- // Nothing to map or already mapped
+ acs.getObjectMetadata().containsKey(AttributesMapContainer.class) ||
+ acs.getParent() != null) {
+ log.trace("{} skipping mapping for AttributeConsumingService", getLogPrefix());
+ // Nothing to map, already mapped, or attached to metadata (and hence already scanned)
return;
}
try {
final AttributeMappingNodeProcessor processor = new AttributeMappingNodeProcessor(attributeResolverService);
+ log.debug("{} mapping requested Attributes for generated AttributeConsumingService", getLogPrefix());
processor.process(acs);
} catch (final FilterException e) {
log.error("{} Error mapping Attributesresponding to request", getLogPrefix(), e);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list