Class AttributeFilterContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.attribute.filter.context.AttributeFilterContext
- All Implemented Interfaces:
Iterable<BaseContext>
A context supplying input to the
AttributeFilter
interface.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Used to indicate the "direction" of filtering relative to the IdP.Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The attribute source identity.private String
The attribute recipient's group identity.private String
The attribute recipient identity.private AttributeFilterContext.Direction
Direction of filtering.private Map<String,
IdPAttribute> Attributes which have been filtered.private SAMLMetadataContext
Cache of issuer metadata context.Lookup strategy used to locate the IdP's metadata context.private MetadataResolver
Optional, supplemental metadata resolver.private Map<String,
IdPAttribute> Attributes which are to be filtered.private String
The principal associated with the filtering.private ProxiedRequesterContext
Cache of the proxied requester context.Lookup strategy used to locate aProxiedRequesterContext
.private SAMLMetadataContext
Cache of proxied requester metadata context.Lookup strategy used to locate a proxied requester's metadata context.private SAMLMetadataContext
Cache of requester metadata context.Lookup strategy used to locate the SP's metadata context. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
filterAttributes
(ReloadableService<AttributeFilter> attributeFilterService) Helper method to invoke an AttributeFilter service using this context.Gets the attribute issuer (me) associated with this filtering.Get the attribute recipient grouping associated with this filtering.Gets the attribute recipient (her) associated with this filtering.Gets the direction of filtering.Gets the collection of attributes, indexed by ID, left after the filtering process has run.Get the Issuer Metadata context.Get the strategy used to locate the IdP's metadata context.Get supplemental source of metadata for filtering rules.Gets the collection of attributes that are to be filtered, indexed by attribute ID.Sets the principal associated with the filtering.Get theProxiedRequesterContext
.Get the strategy used to locate theProxiedRequesterContext
.Get the Proxied Requester Metadata context.Get the strategy used to locate a proxied requester's metadata context.Get the Requester Metadata context.Get the strategy used to locate the IdP's metadata context.setAttributeIssuerID
(String value) Sets the attribute issuer (me) associated with this filtering.Set the attribute recipient grouping associated with this filtering.setAttributeRecipientID
(String value) Sets the attribute recipient (her) associated with this filtering.Sets the direction of filtering.setFilteredIdPAttributes
(Collection<IdPAttribute> attributes) Sets the attributes that have been filtered.setIssuerMetadataContextLookupStrategy
(Function<AttributeFilterContext, SAMLMetadataContext> strategy) Set the strategy used to locate the IdP's metadata context.setMetadataResolver
(MetadataResolver resolver) Set supplemental source of metadata for filtering rules.setPrefilteredIdPAttributes
(Collection<IdPAttribute> attributes) Sets the attributes which are to be filtered.setPrincipal
(String who) Gets the principal associated with the filtering.setProxiedRequesterContextLookupStrategy
(Function<AttributeFilterContext, ProxiedRequesterContext> strategy) Set the strategy used to locate the SP's metadata context.setProxiedRequesterMetadataContextLookupStrategy
(Function<AttributeFilterContext, SAMLMetadataContext> strategy) Set the strategy used to locate a proxied requester's metadata context.setRequesterMetadataContextLookupStrategy
(Function<AttributeFilterContext, SAMLMetadataContext> strategy) Set the strategy used to locate the SP's metadata context.Methods inherited from class org.opensaml.messaging.context.BaseContext
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeSubcontext, removeSubcontext, setParent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
direction
Direction of filtering. -
prefilteredAttributes
Attributes which are to be filtered. -
filteredAttributes
Attributes which have been filtered. -
metadataResolver
Optional, supplemental metadata resolver. -
principal
The principal associated with the filtering. -
attributeIssuerID
The attribute source identity. -
attributeRecipientID
The attribute recipient identity. -
attributeRecipientGroupID
The attribute recipient's group identity. -
issuerMetadataContext
Cache of issuer metadata context. -
requesterMetadataContext
Cache of requester metadata context. -
proxiedRequesterContext
Cache of the proxied requester context. -
proxiedRequesterMetadataContext
Cache of proxied requester metadata context. -
issuerMetadataContextLookupStrategy
@Nullable private Function<AttributeFilterContext,SAMLMetadataContext> issuerMetadataContextLookupStrategyLookup strategy used to locate the IdP's metadata context. -
requesterMetadataContextLookupStrategy
@Nullable private Function<AttributeFilterContext,SAMLMetadataContext> requesterMetadataContextLookupStrategyLookup strategy used to locate the SP's metadata context. -
proxiedRequesterContextLookupStrategy
@Nullable private Function<AttributeFilterContext,ProxiedRequesterContext> proxiedRequesterContextLookupStrategyLookup strategy used to locate aProxiedRequesterContext
. -
proxiedRequesterMetadataContextLookupStrategy
@Nullable private Function<AttributeFilterContext,SAMLMetadataContext> proxiedRequesterMetadataContextLookupStrategyLookup strategy used to locate a proxied requester's metadata context.
-
-
Constructor Details
-
AttributeFilterContext
public AttributeFilterContext()Constructor.
-
-
Method Details
-
getDirection
Gets the direction of filtering.- Returns:
- the direction
- Since:
- 4.0.0
-
setDirection
Sets the direction of filtering.- Parameters:
dir
- the direction- Returns:
- this context
- Since:
- 4.0.0
-
getPrefilteredIdPAttributes
@Nonnull @NonnullElements @NotLive @Unmodifiable public Map<String,IdPAttribute> getPrefilteredIdPAttributes()Gets the collection of attributes that are to be filtered, indexed by attribute ID.- Returns:
- attributes to be filtered
-
setPrefilteredIdPAttributes
@Nonnull public AttributeFilterContext setPrefilteredIdPAttributes(@Nullable @NonnullElements Collection<IdPAttribute> attributes) Sets the attributes which are to be filtered.- Parameters:
attributes
- attributes which are to be filtered- Returns:
- this context;
-
getFilteredIdPAttributes
@Nonnull @NonnullElements @Unmodifiable @NotLive public Map<String,IdPAttribute> getFilteredIdPAttributes()Gets the collection of attributes, indexed by ID, left after the filtering process has run.- Returns:
- attributes left after the filtering process has run
-
setFilteredIdPAttributes
@Nonnull public AttributeFilterContext setFilteredIdPAttributes(@Nullable @NonnullElements Collection<IdPAttribute> attributes) Sets the attributes that have been filtered.- Parameters:
attributes
- attributes that have been filtered- Returns:
- this context
-
getMetadataResolver
Get supplemental source of metadata for filtering rules.- Returns:
- metadata resolver
- Since:
- 3.4.0
-
setMetadataResolver
Set supplemental source of metadata for filtering rules.- Parameters:
resolver
- metadata resolver- Returns:
- this context
- Since:
- 3.4.0
-
getPrincipal
Sets the principal associated with the filtering.- Returns:
- Returns the principal.
-
setPrincipal
Gets the principal associated with the filtering.- Parameters:
who
- principal to set- Returns:
- this context
-
getAttributeIssuerID
Gets the attribute issuer (me) associated with this filtering.- Returns:
- the attribute issuer associated with this filtering
-
setAttributeIssuerID
Sets the attribute issuer (me) associated with this filtering.- Parameters:
value
- the attribute issuer associated with this filtering- Returns:
- this context
-
getAttributeRecipientID
Gets the attribute recipient (her) associated with this filtering.- Returns:
- the attribute recipient associated with this filtering
-
setAttributeRecipientID
Sets the attribute recipient (her) associated with this filtering.- Parameters:
value
- the attribute recipient associated with this filtering- Returns:
- this context
-
getAttributeRecipientGroupID
Get the attribute recipient grouping associated with this filtering.This is a protocol-independent way to represent an association between the attribute recipient and some larger group that may be relevant to attribute filtering.
- Returns:
- the attribute recipient group associated with this filtering
- Since:
- 3.4.0
-
setAttributeRecipientGroupID
Set the attribute recipient grouping associated with this filtering.- Parameters:
value
- the attribute recipient group associated with this filtering- Returns:
- this context
- Since:
- 3.4.0
-
getRequesterMetadataContextLookupStrategy
@Nullable public Function<AttributeFilterContext,SAMLMetadataContext> getRequesterMetadataContextLookupStrategy()Get the strategy used to locate the IdP's metadata context.- Returns:
- lookup strategy
-
setRequesterMetadataContextLookupStrategy
@Nonnull public AttributeFilterContext setRequesterMetadataContextLookupStrategy(@Nullable Function<AttributeFilterContext, SAMLMetadataContext> strategy) Set the strategy used to locate the SP's metadata context.- Parameters:
strategy
- lookup strategy- Returns:
- this context
-
setIssuerMetadataContextLookupStrategy
@Nonnull public AttributeFilterContext setIssuerMetadataContextLookupStrategy(@Nullable Function<AttributeFilterContext, SAMLMetadataContext> strategy) Set the strategy used to locate the IdP's metadata context.- Parameters:
strategy
- lookup strategy- Returns:
- this context
- Since:
- 4.0.0
-
getIssuerMetadataContextLookupStrategy
@Nullable public Function<AttributeFilterContext,SAMLMetadataContext> getIssuerMetadataContextLookupStrategy()Get the strategy used to locate the IdP's metadata context.- Returns:
- lookup strategy
- Since:
- 4.0.0
-
getProxiedRequesterContextLookupStrategy
@Nullable public Function<AttributeFilterContext,ProxiedRequesterContext> getProxiedRequesterContextLookupStrategy()Get the strategy used to locate theProxiedRequesterContext
.- Returns:
- lookup strategy
- Since:
- 3.4.0
-
setProxiedRequesterContextLookupStrategy
@Nonnull public AttributeFilterContext setProxiedRequesterContextLookupStrategy(@Nullable Function<AttributeFilterContext, ProxiedRequesterContext> strategy) Set the strategy used to locate the SP's metadata context.- Parameters:
strategy
- lookup strategy- Returns:
- this context
- Since:
- 3.4.0
-
getProxiedRequesterMetadataContextLookupStrategy
@Nullable public Function<AttributeFilterContext,SAMLMetadataContext> getProxiedRequesterMetadataContextLookupStrategy()Get the strategy used to locate a proxied requester's metadata context.- Returns:
- lookup strategy
- Since:
- 4.2.0
-
setProxiedRequesterMetadataContextLookupStrategy
@Nonnull public AttributeFilterContext setProxiedRequesterMetadataContextLookupStrategy(@Nullable Function<AttributeFilterContext, SAMLMetadataContext> strategy) Set the strategy used to locate a proxied requester's metadata context.- Parameters:
strategy
- lookup strategy- Returns:
- this context
- Since:
- 4.2.0
-
getIssuerMetadataContext
Get the Issuer Metadata context.This value is cached and so only calculated once.
- Returns:
- the context
- Since:
- 4.0.0
-
getRequesterMetadataContext
Get the Requester Metadata context.This value is cached and so only calculated once.
- Returns:
- the context
-
getProxiedRequesterContext
Get theProxiedRequesterContext
.This value is cached and so only calculated once.
- Returns:
- the context
- Since:
- 3.4.0
-
getProxiedRequesterMetadataContext
Get the Proxied Requester Metadata context.This value is cached and so only calculated once.
- Returns:
- the context
- Since:
- 4.2.0
-
filterAttributes
Helper method to invoke an AttributeFilter service using this context.- Parameters:
attributeFilterService
- the service to invoke- Since:
- 4.0.0
-