Class DecryptAttributes

  • 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 DecryptAttributes
    extends AbstractDecryptAction
    Action to decrypt an EncryptedAttribute element and replace it with the decrypted Attribute in situ.

    All of the built-in SAML message types that may include an EncryptedAttribute 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_ATTRIBUTE_FAILED
    • Field Detail

      • log

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

      • DecryptAttributes

        public DecryptAttributes()
    • Method Detail

      • doExecute

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

        @Nullable
        private org.opensaml.saml.saml2.core.Attribute processEncryptedAttribute​(@Nonnull
                                                                                 org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
                                                                                 @Nonnull
                                                                                 org.opensaml.saml.saml2.core.EncryptedAttribute encAttr)
                                                                          throws org.opensaml.xmlsec.encryption.support.DecryptionException
        Decrypt an EncryptedAttribute and return the result.
        Parameters:
        profileRequestContext - current profile request context
        encAttr - the encrypted object
        Returns:
        the decrypted attribute, or null if the object did not need decryption
        Throws:
        org.opensaml.xmlsec.encryption.support.DecryptionException - if an error occurs during decryption
      • processAssertion

        private void processAssertion​(@Nonnull
                                      org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
                                      @Nonnull
                                      org.opensaml.saml.saml2.core.Assertion assertion)
                               throws org.opensaml.xmlsec.encryption.support.DecryptionException
        Decrypt any EncryptedAttribute found in an assertion and replace it with the result.
        Parameters:
        profileRequestContext - current profile request context
        assertion - assertion to operate on
        Throws:
        org.opensaml.xmlsec.encryption.support.DecryptionException - if an error occurs