Interface SecurityProcessingContext

  • All Known Subinterfaces:
    JAXWSProcessingContext
    All Known Implementing Classes:
    FilterProcessingContext, JAXWSProcessingContextImpl, ProcessingContext, ProcessingContextImpl

    public interface SecurityProcessingContext
    This interface represents a Context that is used by the XWS-Security 2.0 Runtime to apply/verify Security Policies on an Outgoing/Incoming SOAP Message. The context contains among other things
    • The SOAP Message to be operated upon
    • The Message direction (incoming or outgoing)
    • The security policy to be applied by XWS-Security on the message
    • A randomly generated Message-Identifier that can be used for request-response correlation, by a CallbackHandler, the handles DynamicPolicyCallback
    • A list of properties associated with the calling Application Runtime, that can be used to make Dynamic Policy decisions.
    • A concrete implementation of the SecurityEnvironment interface OR a CallbackHandler
    • Method Detail

      • copy

        void copy​(SecurityProcessingContext ctx1,
                  SecurityProcessingContext ctx2)
           throws com.sun.xml.wss.XWSSecurityException
        copy operator
        Parameters:
        ctx1 - the ProcessingContext to which to copy
        ctx2 - the ProcessingContext from which to copy
        Throws:
        com.sun.xml.wss.XWSSecurityException - if there was an error during the copy operation
      • getConfigType

        int getConfigType()
        This method is used for internal purposes
      • getExtraneousProperties

        Map getExtraneousProperties()
        Properties extraneously defined by XWSS runtime - can contain application's runtime context (like JAXRPCContext etc)
        Returns:
        Map of extraneous properties
      • getExtraneousProperty

        Object getExtraneousProperty​(String name)
        Returns:
        the value for the named extraneous property.
      • getHandler

        CallbackHandler getHandler()
        Returns:
        the CallbackHandler set for the context
      • getMessageIdentifier

        String getMessageIdentifier()
        Returns:
        message identifier for the Message in the context
      • getPolicyContext

        StaticPolicyContext getPolicyContext()
        Returns:
        StaticPolicyContext associated with this ProcessingContext, null otherwise
      • getSOAPMessage

        jakarta.xml.soap.SOAPMessage getSOAPMessage()
        Returns:
        the SOAPMessage from the context
      • getSecurityEnvironment

        SecurityEnvironment getSecurityEnvironment()
        Returns:
        The SecurityEnvironment Handler set for the context
      • getSecurityPolicy

        SecurityPolicy getSecurityPolicy()
        Returns:
        SecurityPolicy for this context
      • isInboundMessage

        boolean isInboundMessage()
        Returns:
        message flow direction, true if incoming, false otherwise
      • isInboundMessage

        void isInboundMessage​(boolean inBound)
        set the message flow direction (to true if inbound, false if outbound)
        Parameters:
        inBound - message flow direction
      • removeExtraneousProperty

        void removeExtraneousProperty​(String name)
        remove the named extraneous property if present
        Parameters:
        name - the Extraneous Property to be removed
      • reset

        void reset()
        This method is used for internal purposes
      • setConfigType

        void setConfigType​(int type)
        This method is used for internal purposes
      • setExtraneousProperty

        void setExtraneousProperty​(String name,
                                   Object value)
        set the extraneous property into the context Extraneous Properties are properties extraneously defined by XWSS runtime and can contain application's runtime context (like JAXRPCContext etc)
        Parameters:
        name - the property name
        value - the property value
      • setHandler

        void setHandler​(CallbackHandler handler)
        set the CallbackHandler for the context
        Parameters:
        handler - The CallbackHandler
      • setMessageIdentifier

        void setMessageIdentifier​(String identifier)
        Allow for message identifier to be generated externally
        Parameters:
        identifier - the Message Identifier value
      • setPolicyContext

        void setPolicyContext​(StaticPolicyContext context)
        set the StaticPolicyContext for this ProcessingContext.
        Parameters:
        context - StaticPolicyContext for this context
      • setSOAPMessage

        void setSOAPMessage​(jakarta.xml.soap.SOAPMessage message)
                     throws com.sun.xml.wss.XWSSecurityException
        set the SOAP Message into the ProcessingContext.
        Parameters:
        message - SOAPMessage
        Throws:
        com.sun.xml.wss.XWSSecurityException - if there was an error in setting the SOAPMessage
      • setSecurityEnvironment

        void setSecurityEnvironment​(SecurityEnvironment handler)
        set the SecurityEnvironment Handler for the context
        Parameters:
        handler - The SecurityEnvironment Handler
      • setSecurityPolicy

        void setSecurityPolicy​(SecurityPolicy securityPolicy)
                        throws com.sun.xml.wss.XWSSecurityException
        set the SecurityPolicy for the context
        Parameters:
        securityPolicy - SecurityPolicy
        Throws:
        com.sun.xml.wss.XWSSecurityException - if the securityPolicy is of invalid type