Class VerifyChannelBindings

  • 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 VerifyChannelBindings
    extends org.opensaml.profile.action.AbstractProfileAction
    Action that verifies two sets of ChannelBindings from two different ChannelBindingsContext objects obtained via lookup functions, by default from below the inbound message context and from below a SOAP11Context below the inbound message context.

    If neither function supplies a non-empty ChannelBindingsContext, then there is no verification required, but if either one supplies a non-empty context, then a match must be achieved or an error event is signaled.

    If verification is successful, then the resulting match is stored in a new ChannelBindingsContext object created from a lookup/creation function, by default below the outbound message context.

    Event:
    EventIds.PROCEED_EVENT_ID, SAMLEventIds.CHANNEL_BINDINGS_ERROR
    Precondition:
    ChannelBindingsContext objects to be returned from lookup functions must be populated.
    Postcondition:
    Upon successful verification, a ChannelBindingsContext object will be created as described.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.opensaml.saml.common.messaging.context.ChannelBindingsContext channelBindingsContext1
      The first set of bindings.
      private org.opensaml.saml.common.messaging.context.ChannelBindingsContext channelBindingsContext2
      The second set of bindings.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> channelBindingsCreationStrategy
      Strategy used to locate or create the context to save the verified result in.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> channelBindingsLookupStrategy1
      Strategy used to locate the first set of bindings to operate on.
      private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> channelBindingsLookupStrategy2
      Strategy used to locate the second set of bindings to operate on.
      private Logger log
      Class logger.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      protected boolean doPreExecute​(org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
      void setChannelBindingsCreationStrategy​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> strategy)
      Set the strategy used to create or locate the ChannelBindingsContext to save verified results in.
      void setChannelBindingsLookupStrategy1​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> strategy)
      Set the strategy used to locate the first ChannelBindingsContext to operate on.
      void setChannelBindingsLookupStrategy2​(Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> strategy)
      Set the strategy used to locate the second ChannelBindingsContext to operate on.
      • 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, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
      • Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent

        initialize, isInitialized
    • Field Detail

      • log

        @Nonnull
        private final Logger log
        Class logger.
      • channelBindingsLookupStrategy1

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> channelBindingsLookupStrategy1
        Strategy used to locate the first set of bindings to operate on.
      • channelBindingsLookupStrategy2

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> channelBindingsLookupStrategy2
        Strategy used to locate the second set of bindings to operate on.
      • channelBindingsCreationStrategy

        @Nonnull
        private Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> channelBindingsCreationStrategy
        Strategy used to locate or create the context to save the verified result in.
      • channelBindingsContext1

        @Nullable
        private org.opensaml.saml.common.messaging.context.ChannelBindingsContext channelBindingsContext1
        The first set of bindings.
      • channelBindingsContext2

        @Nullable
        private org.opensaml.saml.common.messaging.context.ChannelBindingsContext channelBindingsContext2
        The second set of bindings.
    • Constructor Detail

      • VerifyChannelBindings

        public VerifyChannelBindings()
        Constructor.
    • Method Detail

      • setChannelBindingsLookupStrategy1

        public void setChannelBindingsLookupStrategy1​(@Nonnull
                                                      Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> strategy)
        Set the strategy used to locate the first ChannelBindingsContext to operate on.
        Parameters:
        strategy - lookup strategy
      • setChannelBindingsLookupStrategy2

        public void setChannelBindingsLookupStrategy2​(@Nonnull
                                                      Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> strategy)
        Set the strategy used to locate the second ChannelBindingsContext to operate on.
        Parameters:
        strategy - lookup strategy
      • setChannelBindingsCreationStrategy

        public void setChannelBindingsCreationStrategy​(@Nonnull
                                                       Function<org.opensaml.profile.context.ProfileRequestContext,​org.opensaml.saml.common.messaging.context.ChannelBindingsContext> strategy)
        Set the strategy used to create or locate the ChannelBindingsContext to save verified results in.
        Parameters:
        strategy - lookup/creation strategy
      • doPreExecute

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

        protected void doExecute​(@Nonnull
                                 org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
        Overrides:
        doExecute in class org.opensaml.profile.action.AbstractProfileAction