Class PopulateSignatureSigningParameters

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, org.opensaml.profile.action.ProfileAction

    public class PopulateSignatureSigningParameters
    extends org.opensaml.profile.action.AbstractHandlerDelegatingProfileAction<PopulateSignatureSigningParametersHandler>
    Action that resolves and populates SignatureSigningParameters on a SecurityParametersContext created/accessed via a lookup function, by default on the outbound message context.
    Event:
    EventIds.PROCEED_EVENT_ID, EventIds.INVALID_MSG_CTX, EventIds.INVALID_SEC_CFG
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Function<org.opensaml.profile.context.ProfileRequestContext,​List<org.opensaml.xmlsec.SignatureSigningConfiguration>> configurationLookupStrategy
      Strategy used to look up a per-request SignatureSigningConfiguration list.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.xmlsec.context.SecurityParametersContext> existingParametersContextLookupStrategy
      Strategy used to look up an existing SecurityParametersContext to copy.
      private org.slf4j.Logger log
      Class logger.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.SAMLMetadataContext> metadataContextLookupStrategy
      Strategy used to look up a SAML metadata context.
      private boolean noResultIsError
      Whether failure to resolve parameters should be raised as an error.
      private org.opensaml.xmlsec.SignatureSigningParametersResolver resolver
      Resolver for parameters to store into context.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.xmlsec.context.SecurityParametersContext> securityParametersContextLookupStrategy
      Strategy used to look up the SecurityParametersContext to set the parameters for.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doInitialize()
      protected boolean doPreExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      void setConfigurationLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​List<org.opensaml.xmlsec.SignatureSigningConfiguration>> strategy)
      Set the strategy used to look up a per-request SignatureSigningConfiguration list.
      void setExistingParametersContextLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.xmlsec.context.SecurityParametersContext> strategy)
      Set the strategy used to look up an existing SecurityParametersContext to copy instead of actually resolving the parameters to set.
      void setMetadataContextLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.SAMLMetadataContext> strategy)
      Set lookup strategy for SAMLMetadataContext for input to resolution.
      void setNoResultIsError​(boolean flag)
      Set whether a failure to resolve any parameters should be raised as an exception.
      void setSecurityParametersContextLookupStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.xmlsec.context.SecurityParametersContext> strategy)
      Set the strategy used to look up the SecurityParametersContext to set the parameters for.
      void setSignatureSigningParametersResolver​(org.opensaml.xmlsec.SignatureSigningParametersResolver newResolver)
      Set the resolver to use for the parameters to store into the context.
      • Methods inherited from class org.opensaml.profile.action.AbstractHandlerDelegatingProfileAction

        adapt, adapt, doDestroy, doExecute, getDelegate, setErrorEvent
      • Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

        getActivationCondition, setActivationCondition
      • Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

        doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
      • Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent

        destroy, initialize, isDestroyed, isInitialized
      • Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent

        initialize, isInitialized
    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • securityParametersContextLookupStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.xmlsec.context.SecurityParametersContext> securityParametersContextLookupStrategy
        Strategy used to look up the SecurityParametersContext to set the parameters for.
      • existingParametersContextLookupStrategy

        @Nullable
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.xmlsec.context.SecurityParametersContext> existingParametersContextLookupStrategy
        Strategy used to look up an existing SecurityParametersContext to copy.
      • configurationLookupStrategy

        @NonnullAfterInit
        private Function<org.opensaml.profile.context.ProfileRequestContext,​List<org.opensaml.xmlsec.SignatureSigningConfiguration>> configurationLookupStrategy
        Strategy used to look up a per-request SignatureSigningConfiguration list.
      • metadataContextLookupStrategy

        @Nullable
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.SAMLMetadataContext> metadataContextLookupStrategy
        Strategy used to look up a SAML metadata context.
      • resolver

        @NonnullAfterInit
        private org.opensaml.xmlsec.SignatureSigningParametersResolver resolver
        Resolver for parameters to store into context.
      • noResultIsError

        private boolean noResultIsError
        Whether failure to resolve parameters should be raised as an error.
    • Constructor Detail

      • PopulateSignatureSigningParameters

        public PopulateSignatureSigningParameters()
        Constructor.
    • Method Detail

      • setSecurityParametersContextLookupStrategy

        public void setSecurityParametersContextLookupStrategy​(@Nonnull
                                                               Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.xmlsec.context.SecurityParametersContext> strategy)
        Set the strategy used to look up the SecurityParametersContext to set the parameters for.
        Parameters:
        strategy - lookup strategy
      • setExistingParametersContextLookupStrategy

        public void setExistingParametersContextLookupStrategy​(@Nullable
                                                               Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.xmlsec.context.SecurityParametersContext> strategy)
        Set the strategy used to look up an existing SecurityParametersContext to copy instead of actually resolving the parameters to set.
        Parameters:
        strategy - lookup strategy
      • setMetadataContextLookupStrategy

        public void setMetadataContextLookupStrategy​(@Nullable
                                                     Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.SAMLMetadataContext> strategy)
        Set lookup strategy for SAMLMetadataContext for input to resolution.
        Parameters:
        strategy - lookup strategy
      • setConfigurationLookupStrategy

        public void setConfigurationLookupStrategy​(@Nonnull
                                                   Function<org.opensaml.profile.context.ProfileRequestContext,​List<org.opensaml.xmlsec.SignatureSigningConfiguration>> strategy)
        Set the strategy used to look up a per-request SignatureSigningConfiguration list.
        Parameters:
        strategy - lookup strategy
      • setSignatureSigningParametersResolver

        public void setSignatureSigningParametersResolver​(@Nonnull
                                                          org.opensaml.xmlsec.SignatureSigningParametersResolver newResolver)
        Set the resolver to use for the parameters to store into the context.
        Parameters:
        newResolver - resolver to use
      • setNoResultIsError

        public void setNoResultIsError​(boolean flag)
        Set whether a failure to resolve any parameters should be raised as an exception.

        Defaults to false.

        Parameters:
        flag - flag to set
        Since:
        3.4.0
      • doInitialize

        protected void doInitialize()
                             throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
        Overrides:
        doInitialize in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
        Throws:
        net.shibboleth.utilities.java.support.component.ComponentInitializationException
      • doPreExecute

        protected boolean doPreExecute​(@Nonnull
                                       org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
        Overrides:
        doPreExecute in class org.opensaml.profile.action.AbstractConditionalProfileAction