Class AttributeFilterContext

java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.idp.attribute.filter.context.AttributeFilterContext
All Implemented Interfaces:
Iterable<BaseContext>

@NotThreadSafe public final class AttributeFilterContext extends BaseContext
A context supplying input to the AttributeFilter interface.
  • Field Details

    • direction

      @Nonnull private AttributeFilterContext.Direction direction
      Direction of filtering.
    • prefilteredAttributes

      @Nonnull private Map<String,IdPAttribute> prefilteredAttributes
      Attributes which are to be filtered.
    • filteredAttributes

      @Nonnull private Map<String,IdPAttribute> filteredAttributes
      Attributes which have been filtered.
    • metadataResolver

      @Nullable private MetadataResolver metadataResolver
      Optional, supplemental metadata resolver.
    • principal

      @Nullable private String principal
      The principal associated with the filtering.
    • attributeIssuerID

      @Nullable private String attributeIssuerID
      The attribute source identity.
    • attributeRecipientID

      @Nullable private String attributeRecipientID
      The attribute recipient identity.
    • attributeRecipientGroupID

      @Nullable private String attributeRecipientGroupID
      The attribute recipient's group identity.
    • issuerMetadataContext

      @Nullable private SAMLMetadataContext issuerMetadataContext
      Cache of issuer metadata context.
    • requesterMetadataContext

      @Nullable private SAMLMetadataContext requesterMetadataContext
      Cache of requester metadata context.
    • proxiedRequesterContext

      @Nullable private ProxiedRequesterContext proxiedRequesterContext
      Cache of the proxied requester context.
    • proxiedRequesterMetadataContext

      @Nullable private SAMLMetadataContext proxiedRequesterMetadataContext
      Cache of proxied requester metadata context.
    • issuerMetadataContextLookupStrategy

      @Nullable private Function<AttributeFilterContext,SAMLMetadataContext> issuerMetadataContextLookupStrategy
      Lookup strategy used to locate the IdP's metadata context.
    • requesterMetadataContextLookupStrategy

      @Nullable private Function<AttributeFilterContext,SAMLMetadataContext> requesterMetadataContextLookupStrategy
      Lookup strategy used to locate the SP's metadata context.
    • proxiedRequesterContextLookupStrategy

      @Nullable private Function<AttributeFilterContext,ProxiedRequesterContext> proxiedRequesterContextLookupStrategy
      Lookup strategy used to locate a ProxiedRequesterContext.
    • proxiedRequesterMetadataContextLookupStrategy

      @Nullable private Function<AttributeFilterContext,SAMLMetadataContext> proxiedRequesterMetadataContextLookupStrategy
      Lookup strategy used to locate a proxied requester's metadata context.
  • Constructor Details

    • AttributeFilterContext

      public AttributeFilterContext()
      Constructor.
  • Method Details

    • getDirection

      @Nonnull public AttributeFilterContext.Direction getDirection()
      Gets the direction of filtering.
      Returns:
      the direction
      Since:
      4.0.0
    • setDirection

      @Nonnull public AttributeFilterContext setDirection(@Nonnull AttributeFilterContext.Direction dir)
      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

      @Nullable public MetadataResolver getMetadataResolver()
      Get supplemental source of metadata for filtering rules.
      Returns:
      metadata resolver
      Since:
      3.4.0
    • setMetadataResolver

      @Nonnull public AttributeFilterContext setMetadataResolver(@Nullable MetadataResolver resolver)
      Set supplemental source of metadata for filtering rules.
      Parameters:
      resolver - metadata resolver
      Returns:
      this context
      Since:
      3.4.0
    • getPrincipal

      @Nullable public String getPrincipal()
      Sets the principal associated with the filtering.
      Returns:
      Returns the principal.
    • setPrincipal

      @Nonnull public AttributeFilterContext setPrincipal(@Nullable String who)
      Gets the principal associated with the filtering.
      Parameters:
      who - principal to set
      Returns:
      this context
    • getAttributeIssuerID

      @Nullable public String getAttributeIssuerID()
      Gets the attribute issuer (me) associated with this filtering.
      Returns:
      the attribute issuer associated with this filtering
    • setAttributeIssuerID

      @Nonnull public AttributeFilterContext setAttributeIssuerID(@Nullable String value)
      Sets the attribute issuer (me) associated with this filtering.
      Parameters:
      value - the attribute issuer associated with this filtering
      Returns:
      this context
    • getAttributeRecipientID

      @Nullable public String getAttributeRecipientID()
      Gets the attribute recipient (her) associated with this filtering.
      Returns:
      the attribute recipient associated with this filtering
    • setAttributeRecipientID

      @Nonnull public AttributeFilterContext setAttributeRecipientID(@Nullable String value)
      Sets the attribute recipient (her) associated with this filtering.
      Parameters:
      value - the attribute recipient associated with this filtering
      Returns:
      this context
    • getAttributeRecipientGroupID

      @Nullable public String 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

      @Nonnull public AttributeFilterContext setAttributeRecipientGroupID(@Nullable String value)
      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 the ProxiedRequesterContext.
      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

      @Nullable public SAMLMetadataContext getIssuerMetadataContext()
      Get the Issuer Metadata context.

      This value is cached and so only calculated once.

      Returns:
      the context
      Since:
      4.0.0
    • getRequesterMetadataContext

      @Nullable public SAMLMetadataContext getRequesterMetadataContext()
      Get the Requester Metadata context.

      This value is cached and so only calculated once.

      Returns:
      the context
    • getProxiedRequesterContext

      @Nullable public ProxiedRequesterContext getProxiedRequesterContext()
      Get the ProxiedRequesterContext.

      This value is cached and so only calculated once.

      Returns:
      the context
      Since:
      3.4.0
    • getProxiedRequesterMetadataContext

      @Nullable public SAMLMetadataContext getProxiedRequesterMetadataContext()
      Get the Proxied Requester Metadata context.

      This value is cached and so only calculated once.

      Returns:
      the context
      Since:
      4.2.0
    • filterAttributes

      public void filterAttributes(@Nonnull ReloadableService<AttributeFilter> attributeFilterService)
      Helper method to invoke an AttributeFilter service using this context.
      Parameters:
      attributeFilterService - the service to invoke
      Since:
      4.0.0