Class DecryptAssertions

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction

public class DecryptAssertions
extends AbstractDecryptAction
Action to decrypt an EncryptedAssertion element and replace it with the decrypted Assertion in situ.

All of the built-in SAML message types that may include an EncryptedAssertion are potentially handled, but the actual message to handle is obtained via strategy function, by default the inbound message.

Event:
EventIds.PROCEED_EVENT_ID, SAMLEventIds.DECRYPT_ASSERTION_FAILED
  • Field Details

    • log

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

    • DecryptAssertions

      public DecryptAssertions()
  • Method Details

    • doExecute

      protected void doExecute​(@Nonnull ProfileRequestContext profileRequestContext)
      Performs this action. Actions must override this method to perform their work.
      Overrides:
      doExecute in class AbstractProfileAction
      Parameters:
      profileRequestContext - the current IdP profile request context
    • processEncryptedAssertion

      @Nullable private Assertion processEncryptedAssertion​(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull EncryptedAssertion encAssert) throws DecryptionException
      Decrypt an EncryptedAssertion and return the result.
      Parameters:
      profileRequestContext - current profile request context
      encAssert - the encrypted object
      Returns:
      the decrypted assertion, or null if the object did not need decryption
      Throws:
      DecryptionException - if an error occurs during decryption
    • processResponse

      private void processResponse​(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull Response response) throws DecryptionException
      Decrypt any EncryptedAssertion found in a response and replace it with the result.
      Parameters:
      profileRequestContext - current profile request context
      response - response to operate on
      Throws:
      DecryptionException - if an error occurs