[java-identity-provider COMMIT] in /trunk/idp-profile-impl/src: main/java/net/shibboleth/idp/profile/impl/FilterAttri...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Jul 7 16:22:01 EDT 2014
Author: scantor
Date: Mon Jul 7 16:22:01 2014
New Revision: 6238
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6238&view=rev
Log:
Indirect population of resolution/filter context data to better handle internal-to-IdP uses.
Modified:
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java
trunk/idp-profile-impl/src/test/java/net/shibboleth/idp/profile/impl/ResolveAttributesTest.java
Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java?rev=6238&r1=6237&r2=6238&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java Mon Jul 7 16:22:01 2014
@@ -30,7 +30,8 @@
import net.shibboleth.idp.profile.AbstractProfileAction;
import net.shibboleth.idp.profile.IdPEventIds;
import net.shibboleth.idp.profile.context.RelyingPartyContext;
-import net.shibboleth.idp.relyingparty.RelyingPartyConfiguration;
+import net.shibboleth.idp.profile.context.navigate.RelyingPartyIdLookupFunction;
+import net.shibboleth.idp.profile.context.navigate.ResponderIdLookupFunction;
import net.shibboleth.idp.service.ReloadableService;
import net.shibboleth.idp.service.ServiceableComponent;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
@@ -65,13 +66,17 @@
/** Class logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(FilterAttributes.class);
- /** Service used to get the engine used to fetch attributes. */
+ /** Service used to get the engine used to filter attributes. */
@Nonnull private final ReloadableService<AttributeFilter> attributeFilterService;
- /**
- * Strategy used to locate the {@link RelyingPartyContext} associated with a given {@link ProfileRequestContext}.
- */
- @Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy;
+ /** Strategy used to locate the identity of the issuer associated with the attribute filtering. */
+ @Nullable private Function<ProfileRequestContext,String> issuerLookupStrategy;
+
+ /** Strategy used to locate the identity of the recipient associated with the attribute filtering. */
+ @Nullable private Function<ProfileRequestContext,String> recipientLookupStrategy;
+
+ /** Strategy used to locate or create the {@link AttributeFilterContext}. */
+ @Nonnull private Function<ProfileRequestContext,AttributeFilterContext> filterContextCreationStrategy;
/** Strategy used to locate the {@link AttributeContext} to filter. */
@Nonnull private Function<ProfileRequestContext,AttributeContext> attributeContextLookupStrategy;
@@ -96,9 +101,6 @@
*/
@Nonnull private Function<AttributeFilterContext,SAMLMetadataContext> metadataFromFilterLookupStrategy;
- /** RelyingPartyContext to operate on. */
- @Nullable private RelyingPartyContext rpContext;
-
/** SubjectContext to work from. */
@Nullable private SubjectContext subjectContext;
@@ -118,11 +120,14 @@
*/
public FilterAttributes(@Nonnull final ReloadableService<AttributeFilter> filterService) {
attributeFilterService = Constraint.isNotNull(filterService, "Service cannot be null");
- relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class, false);
+
+ issuerLookupStrategy = new ResponderIdLookupFunction();
+ recipientLookupStrategy = new RelyingPartyIdLookupFunction();
+
attributeContextLookupStrategy = Functions.compose(new ChildContextLookup<>(AttributeContext.class),
new ChildContextLookup<ProfileRequestContext,RelyingPartyContext>(RelyingPartyContext.class));
- subjectContextLookupStrategy = new ChildContextLookup<>(SubjectContext.class, false);
- authnContextLookupStrategy = new ChildContextLookup<>(AuthenticationContext.class, false);
+ subjectContextLookupStrategy = new ChildContextLookup<>(SubjectContext.class);
+ authnContextLookupStrategy = new ChildContextLookup<>(AuthenticationContext.class);
// Default: inbound msg context -> SAMLPeerEntityContext -> SAMLMetadataContext
metadataContextLookupStrategy = Functions.compose(
@@ -139,21 +144,45 @@
}
},
new RootContextLookup<AttributeFilterContext,ProfileRequestContext>());
- }
-
- /**
- * Sets the strategy used to locate the {@link RelyingPartyContext} associated with a given
- * {@link ProfileRequestContext}.
- *
- * @param strategy strategy used to locate the {@link RelyingPartyContext} associated with a given
[... 381 lines stripped ...]
More information about the commits
mailing list