Class ExecutableQueryBuilder

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.attribute.resolver.dc.saml.impl.ExecutableQueryBuilder
All Implemented Interfaces:
ExecutableSearchBuilder<ExecutableQuery>, Component, DestructableComponent, InitializableComponent

public class ExecutableQueryBuilder extends AbstractInitializableComponent implements ExecutableSearchBuilder<ExecutableQuery>
Component which builds an ExecutableQuery used with the SAMLDataConnector.
  • Field Details

  • Constructor Details

    • ExecutableQueryBuilder

      public ExecutableQueryBuilder()
  • Method Details

    • getAuthorityEndpointResolver

      @NonnullAfterInit public EndpointResolver<AttributeService> getAuthorityEndpointResolver()
      Get the attribute authority endpoint resolver.
      Returns:
      the endpoint resolver
    • setAuthorityEndpointResolver

      public void setAuthorityEndpointResolver(@Nullable EndpointResolver<AttributeService> resolver)
      Set the attribute authority endpoint resolver.
      Parameters:
      resolver - the new resolver
    • getRoleDescriptorResolver

      @NonnullAfterInit public RoleDescriptorResolver getRoleDescriptorResolver()
      Get the role descriptor resolver.
      Returns:
      the role descriptor resolver
    • setRoleDescriptorResolver

      public void setRoleDescriptorResolver(@Nullable RoleDescriptorResolver resolver)
      Set the role descriptor resolver.
      Parameters:
      resolver - the role descriptor resolver
    • getSOAPPipelineName

      @NonnullAfterInit public String getSOAPPipelineName()
      Get the name of the specific SOAP client message pipeline to use, for example with PipelineFactoryHttpSOAPClient.
      Returns:
      the pipeline name, or null
    • setSOAPPipelineName

      public void setSOAPPipelineName(@Nullable String name)
      Set the name of the specific SOAP client message pipeline to use, for example with PipelineFactoryHttpSOAPClient.
      Parameters:
      name - the pipeline name, or null
    • getIdentifierGenerationStrategy

      @NonnullAfterInit public IdentifierGenerationStrategy getIdentifierGenerationStrategy()
      Get the identifier generation strategy.
      Returns:
      Returns the identifier generation strategy
    • setIdentifierGenerationStrategy

      public void setIdentifierGenerationStrategy(@Nonnull IdentifierGenerationStrategy strategy)
      Set the identifier generation strategy.
      Parameters:
      strategy - the identifier generation strategy
    • getSOAPClientSecurityConfigurationProfileId

      @NonnullAfterInit public String getSOAPClientSecurityConfigurationProfileId()
      Get the SOAP client security configuration profile ID to use.
      Returns:
      the client security configuration profile ID, or null
    • setSOAPClientSecurityConfigurationProfileId

      public void setSOAPClientSecurityConfigurationProfileId(@Nullable String profileId)
      Set the SOAP client security configuration profile ID to use.
      Parameters:
      profileId - the profile ID, or null
    • getAuthorityEntityIDStrategy

      @NonnullAfterInit public AttributeAuthorityEntityIDResolver getAuthorityEntityIDStrategy()
      Get the attribute authority entity ID resolution strategy.
      Returns:
      the strategy
    • setAuthorityEntityIDStrategy

      public void setAuthorityEntityIDStrategy(@Nonnull AttributeAuthorityEntityIDResolver strategy)
      Set the attribute authority entity ID resolution strategy.
      Parameters:
      strategy - the entityID resolution strategy
    • getSelfEntityIDStrategy

      @NonnullAfterInit public SelfEntityIDResolver getSelfEntityIDStrategy()
      Get the self entity ID resolution strategy.
      Returns:
      the strategy
    • setSelfEntityIDStrategy

      public void setSelfEntityIDStrategy(@Nonnull SelfEntityIDResolver strategy)
      Set the self entity ID resolution strategy.
      Parameters:
      strategy - the entityID resolution strategy
    • getSubjectStrategy

      @NonnullAfterInit public SubjectResolver getSubjectStrategy()
      Get the Subject resolution strategy.
      Returns:
      the strategy
    • setSubjectStrategy

      public void setSubjectStrategy(@Nonnull SubjectResolver strategy)
      Set the Subject resolution strategy.
      Parameters:
      strategy - the entityID resolution strategy
    • getRequestedAttributes

      @Unmodifiable @NotLive @Nonnull public List<Attribute> getRequestedAttributes()
      Get the optional list of saml2:Attributes to request in the query.
      Returns:
      the list of attributes, may be null or empty
    • setRequestedAttributes

      public void setRequestedAttributes(@Nullable List<Attribute> attributes)
      Set the optional list of saml2:Attributes to request in the query.
      Parameters:
      attributes - the list of attributes to request, may be null or empty
    • doInitialize

      protected void doInitialize() throws ComponentInitializationException
      Overrides:
      doInitialize in class AbstractInitializableComponent
      Throws:
      ComponentInitializationException
    • build

      @Nonnull public ExecutableQuery build(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue>> dependencyAttributes) throws ResolutionException
      Creates an executable search that can be executed against a data source in order to produce results.
      Specified by:
      build in interface ExecutableSearchBuilder<ExecutableQuery>
      Parameters:
      resolutionContext - current request context
      dependencyAttributes - made available to the executable search
      Returns:
      executable search
      Throws:
      ResolutionException - throw if their is a problem creating the executable search
    • resolveAttributeAuthorityEntityID

      @Nonnull private String resolveAttributeAuthorityEntityID(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue>> dependencyAttributes) throws ResolutionException
      Resolve the attribute authority entityID.
      Parameters:
      resolutionContext - the current attribute resolution context
      dependencyAttributes - the current set of dependency attributes
      Returns:
      the entityID of the attribute authority being processed
      Throws:
      ResolutionException - if there is a fatal error during processing
    • resolveAuthorityRoleDescriptor

      @Nonnull private AttributeAuthorityDescriptor resolveAuthorityRoleDescriptor(@Nonnull String authorityEntityID) throws ResolutionException
      Resolve the attribute authority role descriptor.
      Parameters:
      authorityEntityID - the entityID of the attribute authority being processed
      Returns:
      the the role descriptor of the attribute authority being processed
      Throws:
      ResolutionException - if there is a fatal error during processing
    • resolveAuthorityEndpoint

      @Nonnull private String resolveAuthorityEndpoint(@Nonnull String authorityEntityID, @Nonnull AttributeAuthorityDescriptor authorityRoleDescriptor) throws ResolutionException
      Resolve the attribute authority endpoint.
      Parameters:
      authorityEntityID - the entityID of the attribute authority being processed
      authorityRoleDescriptor - the role descriptor of the attribute authority being processed
      Returns:
      the attribute authority endpoint
      Throws:
      ResolutionException - if there is a fatal error during processing
    • buildOperationContext

      @Nonnull private InOutOperationContext buildOperationContext(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue>> dependencyAttributes, @Nonnull AttributeAuthorityDescriptor roleDescriptor, @Nonnull String endpoint) throws ResolutionException
      Build the SOAP client operation context.
      Parameters:
      resolutionContext - the current attribute resolution context
      dependencyAttributes - the current set of dependency attributes
      roleDescriptor - the role descriptor of the attribute authority being processed
      endpoint - the attribute authority endpoint
      Returns:
      the SOAP client operation context
      Throws:
      ResolutionException - if there is a fatal error during processing
    • resolveSelfEntityID

      @Nonnull private String resolveSelfEntityID(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue>> dependencyAttributes, @Nonnull AttributeAuthorityDescriptor roleDescriptor) throws ResolutionException
      Resolve the entity ID of the protocol message issuer (this entity).
      Parameters:
      resolutionContext - the current attribute resolution context
      dependencyAttributes - the current set of dependency attributes
      roleDescriptor - the role descriptor of the attribute authority being processed
      Returns:
      the entity ID of the protocol message issuer (this entity)
      Throws:
      ResolutionException - if there is a fatal error during processing
    • buildAttributeQueryMessage

      @Nonnull private SAMLObject buildAttributeQueryMessage(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue>> dependencyAttributes, @Nonnull AttributeAuthorityDescriptor roleDescriptor, @Nonnull String endpoint, @Nonnull String selfEntityID) throws ResolutionException
      Build the attribute query message to be sent to the attribute authority.
      Parameters:
      resolutionContext - the current attribute resolution context
      dependencyAttributes - the current set of dependency attributes
      roleDescriptor - the role descriptor of the attribute authority being processed
      endpoint - the attribute authority endpoint
      selfEntityID - the entity ID of the protocol message issuer (this entity)
      Returns:
      the new attribute query message to be sent to the attribute authority
      Throws:
      ResolutionException - if there is a fatal error during processing
    • buildIssuer

      @Nonnull private Issuer buildIssuer(@Nonnull String selfEntityID) throws ResolutionException
      Build the SAML protocol message Issuer element.
      Parameters:
      selfEntityID - the entity ID of the protocol message issuer (this entity)
      Returns:
      the Issuer element
      Throws:
      ResolutionException - if there is a fatal error during processing
    • buildSubject

      @Nonnull private Subject buildSubject(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue>> dependencyAttributes, @Nonnull AttributeAuthorityDescriptor roleDescriptor) throws ResolutionException
      Build SAML protocol message Subject element.
      Parameters:
      resolutionContext - the current attribute resolution context
      dependencyAttributes - the current set of dependency attributes
      roleDescriptor - the role descriptor of the protocol message issuer (this entity)
      Returns:
      the subject to be used in the attribute query message
      Throws:
      ResolutionException - if there is a fatal error during processing
    • buildRequestAttributes

      @Nonnull private List<Attribute> buildRequestAttributes(@Nonnull AttributeResolutionContext resolutionContext, @Nonnull Map<String,List<IdPAttributeValue>> dependencyAttributes, @Nonnull AttributeAuthorityDescriptor roleDescriptor) throws ResolutionException
      Build the list of requested attributes for the SAML protocol message.
      Parameters:
      resolutionContext - the current attribute resolution context
      dependencyAttributes - the current set of dependency attributes
      roleDescriptor - the role descriptor of the attribute authority being processed
      Returns:
      the list of requested attributes to be used in the attribute query message
      Throws:
      ResolutionException - if there is a fatal error during processing