com.sun.xml.wss.jaxws.impl
Class SecurityTubeBase

java.lang.Object
  extended by com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl
      extended by com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
          extended by com.sun.xml.wss.jaxws.impl.SecurityTubeBase
All Implemented Interfaces:
Pipe, Tube
Direct Known Subclasses:
SecurityClientTube, SecurityServerTube

public abstract class SecurityTubeBase
extends AbstractFilterTubeImpl

Author:
Vbkumar.Jayanti@Sun.COM, shyam.rao@sun.com

Field Summary
protected  boolean allowMissingTimestamp
           
protected  AlgorithmSuite bindingLevelAlgSuite
           
protected  Policy bpMSP
           
protected  boolean bsp10
           
protected  WSDLBoundOperation cachedOperation
          Constants for RM Security Processing
protected static boolean debug
           
protected  boolean disableIncPrefix
           
protected  boolean disablePayloadBuffer
           
protected static List<PolicyAssertion> EMPTY_LIST
           
protected  boolean encHeaderContent
           
protected  boolean encRMLifecycleMsg
           
protected  boolean isCertValid
           
protected  boolean isCertValidityVerified
           
protected  boolean isEPREnabled
           
protected  boolean isSOAP12
           
protected  Hashtable<String,IssuedTokenContext> issuedTokenContextMap
           
protected  int iterationsForPDK
           
protected static JAXBContext jaxbContext
           
protected static Logger log
           
protected  Marshaller marshaller
           
protected  McProtocolVersion mcVer
           
protected  boolean optimized
           
protected  List<PolicyAlternativeHolder> policyAlternatives
           
protected  RmProtocolVersion rmVer
           
protected  SecurityEnvironment secEnv
           
protected  boolean securityMUValue
           
protected static ArrayList<String> securityPolicyNamespaces
           
protected  X509Certificate serverCert
           
protected  SOAPFactory soapFactory
           
protected  SOAPVersion soapVersion
           
protected  SecurityPolicyVersion spVersion
           
protected  long timestampTimeOut
           
protected  boolean transportOptimization
           
protected  TubeConfiguration tubeConfig
           
protected  Unmarshaller unmarshaller
           
protected static String WSDLPORT
           
protected static String WSENDPOINT
           
protected  Policy wsitConfig
           
protected  PolicyMap wsPolicyMap
           
protected  WSSCVersion wsscVer
           
protected  WSTrustVersion wsTrustVer
           
 
Fields inherited from class com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
next
 
Constructor Summary
protected SecurityTubeBase(SecurityTubeBase that, TubeCloner cloner)
           
  SecurityTubeBase(TubeConfiguration config, Tube nextTube)
           
 
Method Summary
protected abstract  void addIncomingFaultPolicy(Policy effectivePolicy, SecurityPolicyHolder sph, WSDLFault fault)
           
protected abstract  SecurityPolicyHolder addIncomingMP(WSDLBoundOperation operation, Policy policy, PolicyAlternativeHolder ph)
           
protected abstract  void addIncomingProtocolPolicy(Policy effectivePolicy, String protocol, PolicyAlternativeHolder ph)
           
protected abstract  void addOutgoingFaultPolicy(Policy effectivePolicy, SecurityPolicyHolder sph, WSDLFault fault)
           
protected abstract  SecurityPolicyHolder addOutgoingMP(WSDLBoundOperation operation, Policy policy, PolicyAlternativeHolder ph)
           
protected abstract  void addOutgoingProtocolPolicy(Policy effectivePolicy, String protocol, PolicyAlternativeHolder ph)
           
protected  boolean bindingHasIssuedTokenPolicy()
           
protected  boolean bindingHasRMPolicy()
           
protected  boolean bindingHasSecureConversationPolicy()
           
protected  void buildProtocolPolicy(Policy endpointPolicy, PolicyAlternativeHolder ph)
           
protected  void cacheMessage(Packet packet)
           
protected  void cacheOperation(Message msg)
           
protected  void collectPolicies(List<PolicyAlternativeHolder> alternatives)
          Summary from Section 4.2, WS-Security Policy spec( version 1.1 July 2005 ).
protected  SecurityPolicyHolder constructPolicyHolder(Policy effectivePolicy, boolean isServer, boolean isIncoming)
           
protected  SecurityPolicyHolder constructPolicyHolder(Policy effectivePolicy, boolean isServer, boolean isIncoming, boolean ignoreST)
           
protected  RuntimeException generateInternalError(PolicyException ex)
           
protected  String getAction(Packet packet)
           
protected abstract  String getAction(WSDLOperation operation, boolean isIncomming)
           
protected  AlgorithmSuite getAlgoSuite(AlgorithmSuite suite)
           
protected  AlgorithmSuite getBindingAlgorithmSuite(Packet packet)
           
protected  Policy getEffectiveBootstrapPolicy(NestedPolicy bp)
           
protected  List<PolicyAssertion> getInBoundSCP(Message message)
           
protected  MessagePolicy getInboundXWSBootstrapPolicy(Token scAssertion)
           
protected  List<PolicyAssertion> getIssuedTokenPoliciesFromBootstrapPolicy(Token scAssertion)
           
protected  List<PolicyAssertion> getKerberosTokenPoliciesFromBootstrapPolicy(Token scAssertion)
           
protected  WSDLBoundOperation getOperation(Message message)
           
protected  PolicyMapKey getOperationKey(Message message)
           
protected  List<PolicyAssertion> getOutBoundKTP(Packet packet, boolean isSCMessage)
           
protected  List<PolicyAssertion> getOutBoundSCP(Message message)
           
protected  MessagePolicy getOutgoingXWSBootstrapPolicy(Token scAssertion)
           
protected  MessagePolicy getOutgoingXWSSecurityPolicy(Packet packet, boolean isSCMessage)
           
protected  List<PolicyAssertion> getSecureConversationPolicies(Message message, String scope)
           
protected  SOAPFault getSOAPFault(WssSoapFaultException sfe)
           
protected  SOAPFaultException getSOAPFaultException(WssSoapFaultException sfe)
           
protected  SOAPFaultException getSOAPFaultException(XWSSecurityException xwse)
           
protected  ArrayList<PolicyAssertion> getTokens(Policy policy)
           
protected  WSDLBoundOperation getWSDLOpFromAction(Packet packet, boolean isIncomming)
           
protected  WSDLBoundOperation getWSDLOpFromAction(Packet packet, boolean isIncomming, boolean isFault)
           
protected  WSSAssertion getWssAssertion(WSSAssertion asser)
           
protected  boolean hasKerberosTokenPolicy()
           
protected  ProcessingContext initializeInboundProcessingContext(Packet packet)
           
protected  ProcessingContext initializeOutgoingProcessingContext(Packet packet, boolean isSCMessage)
           
protected  boolean isAddressingEnabled()
           
protected  boolean isMakeConnectionMessage(Packet packet)
           
protected  boolean isRMMessage(Packet packet)
           
protected  boolean isSCCancel(Packet packet)
           
protected  boolean isSCMessage(Packet packet)
           
protected  boolean isSCRenew(Packet packet)
           
protected  boolean isTrustMessage(Packet packet)
           
protected  Class loadClass(String classname)
           
protected  String populateConfigProperties(Set<PolicyAssertion> configAssertions, Properties props)
           
protected  void resetCachedOperation()
           
protected  PolicyAlternativeHolder resolveAlternative(Packet packet, boolean isSCMessage)
           
protected  Message secureOutboundMessage(Message message, ProcessingContext ctx)
           
protected  SOAPMessage secureOutboundMessage(SOAPMessage message, ProcessingContext ctx)
           
protected  PolicySourceModel unmarshalPolicy(String resource)
           
protected  Message verifyInboundMessage(Message message, ProcessingContext ctx)
           
protected  SOAPMessage verifyInboundMessage(SOAPMessage message, ProcessingContext ctx)
           
 
Methods inherited from class com.sun.xml.ws.api.pipe.helper.AbstractFilterTubeImpl
preDestroy, processException, processRequest, processResponse
 
Methods inherited from class com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl
copy, copy, doInvoke, doInvokeAndForget, doReturnWith, doSuspend, doSuspend, doSuspend, doSuspend, doThrow, doThrow, process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Logger log

optimized

protected boolean optimized

transportOptimization

protected boolean transportOptimization

issuedTokenContextMap

protected Hashtable<String,IssuedTokenContext> issuedTokenContextMap

tubeConfig

protected TubeConfiguration tubeConfig

jaxbContext

protected static JAXBContext jaxbContext

wsscVer

protected WSSCVersion wsscVer

wsTrustVer

protected WSTrustVersion wsTrustVer

rmVer

protected RmProtocolVersion rmVer

mcVer

protected McProtocolVersion mcVer

disablePayloadBuffer

protected boolean disablePayloadBuffer

bindingLevelAlgSuite

protected AlgorithmSuite bindingLevelAlgSuite

disableIncPrefix

protected boolean disableIncPrefix

encHeaderContent

protected boolean encHeaderContent

bsp10

protected boolean bsp10

allowMissingTimestamp

protected boolean allowMissingTimestamp

securityMUValue

protected boolean securityMUValue

encRMLifecycleMsg

protected boolean encRMLifecycleMsg

securityPolicyNamespaces

protected static final ArrayList<String> securityPolicyNamespaces

EMPTY_LIST

protected static final List<PolicyAssertion> EMPTY_LIST

secEnv

protected SecurityEnvironment secEnv

debug

protected static final boolean debug
See Also:
Constant Field Values

isSOAP12

protected boolean isSOAP12

soapVersion

protected SOAPVersion soapVersion

soapFactory

protected SOAPFactory soapFactory

wsPolicyMap

protected PolicyMap wsPolicyMap

bpMSP

protected Policy bpMSP

timestampTimeOut

protected long timestampTimeOut

iterationsForPDK

protected int iterationsForPDK

isEPREnabled

protected boolean isEPREnabled

isCertValidityVerified

protected boolean isCertValidityVerified

policyAlternatives

protected List<PolicyAlternativeHolder> policyAlternatives

cachedOperation

protected WSDLBoundOperation cachedOperation
Constants for RM Security Processing


wsitConfig

protected Policy wsitConfig

marshaller

protected Marshaller marshaller

unmarshaller

protected Unmarshaller unmarshaller

spVersion

protected SecurityPolicyVersion spVersion

WSDLPORT

protected static final String WSDLPORT
See Also:
Constant Field Values

WSENDPOINT

protected static final String WSENDPOINT
See Also:
Constant Field Values

serverCert

protected X509Certificate serverCert

isCertValid

protected boolean isCertValid
Constructor Detail

SecurityTubeBase

public SecurityTubeBase(TubeConfiguration config,
                        Tube nextTube)

SecurityTubeBase

protected SecurityTubeBase(SecurityTubeBase that,
                           TubeCloner cloner)
Method Detail

secureOutboundMessage

protected SOAPMessage secureOutboundMessage(SOAPMessage message,
                                            ProcessingContext ctx)

generateInternalError

protected RuntimeException generateInternalError(PolicyException ex)

secureOutboundMessage

protected Message secureOutboundMessage(Message message,
                                        ProcessingContext ctx)

verifyInboundMessage

protected SOAPMessage verifyInboundMessage(SOAPMessage message,
                                           ProcessingContext ctx)
                                    throws WssSoapFaultException,
                                           XWSSecurityException
Throws:
WssSoapFaultException
XWSSecurityException

verifyInboundMessage

protected Message verifyInboundMessage(Message message,
                                       ProcessingContext ctx)
                                throws XWSSecurityException
Throws:
XWSSecurityException

getIssuedTokenPoliciesFromBootstrapPolicy

protected List<PolicyAssertion> getIssuedTokenPoliciesFromBootstrapPolicy(Token scAssertion)

getKerberosTokenPoliciesFromBootstrapPolicy

protected List<PolicyAssertion> getKerberosTokenPoliciesFromBootstrapPolicy(Token scAssertion)

getOutgoingXWSSecurityPolicy

protected MessagePolicy getOutgoingXWSSecurityPolicy(Packet packet,
                                                     boolean isSCMessage)

getOperation

protected WSDLBoundOperation getOperation(Message message)

getInboundXWSBootstrapPolicy

protected MessagePolicy getInboundXWSBootstrapPolicy(Token scAssertion)

getOutgoingXWSBootstrapPolicy

protected MessagePolicy getOutgoingXWSBootstrapPolicy(Token scAssertion)

initializeInboundProcessingContext

protected ProcessingContext initializeInboundProcessingContext(Packet packet)

bindingHasIssuedTokenPolicy

protected boolean bindingHasIssuedTokenPolicy()

bindingHasSecureConversationPolicy

protected boolean bindingHasSecureConversationPolicy()

bindingHasRMPolicy

protected boolean bindingHasRMPolicy()

hasKerberosTokenPolicy

protected boolean hasKerberosTokenPolicy()

initializeOutgoingProcessingContext

protected ProcessingContext initializeOutgoingProcessingContext(Packet packet,
                                                                boolean isSCMessage)

getSOAPFault

protected SOAPFault getSOAPFault(WssSoapFaultException sfe)

getSOAPFaultException

protected SOAPFaultException getSOAPFaultException(WssSoapFaultException sfe)

getSOAPFaultException

protected SOAPFaultException getSOAPFaultException(XWSSecurityException xwse)

collectPolicies

protected void collectPolicies(List<PolicyAlternativeHolder> alternatives)
Summary from Section 4.2, WS-Security Policy spec( version 1.1 July 2005 ). MessagePolicySubject : policy can be attached to 1) wsdl:binding/wsdl:operation/wsdl:input, ./wsdl:output, or ./wsdl:fault OperationPolicySubject : policy can be attached to 1)wsdl:binding/wsdl:operation EndpointPolicySubject : policy can be attached to 1)wsdl:port 2)wsdl:Binding


getInBoundSCP

protected List<PolicyAssertion> getInBoundSCP(Message message)

getOutBoundSCP

protected List<PolicyAssertion> getOutBoundSCP(Message message)

getOutBoundKTP

protected List<PolicyAssertion> getOutBoundKTP(Packet packet,
                                               boolean isSCMessage)

getSecureConversationPolicies

protected List<PolicyAssertion> getSecureConversationPolicies(Message message,
                                                              String scope)

getTokens

protected ArrayList<PolicyAssertion> getTokens(Policy policy)

getOperationKey

protected PolicyMapKey getOperationKey(Message message)

addOutgoingMP

protected abstract SecurityPolicyHolder addOutgoingMP(WSDLBoundOperation operation,
                                                      Policy policy,
                                                      PolicyAlternativeHolder ph)
                                               throws PolicyException
Throws:
PolicyException

addIncomingMP

protected abstract SecurityPolicyHolder addIncomingMP(WSDLBoundOperation operation,
                                                      Policy policy,
                                                      PolicyAlternativeHolder ph)
                                               throws PolicyException
Throws:
PolicyException

getBindingAlgorithmSuite

protected AlgorithmSuite getBindingAlgorithmSuite(Packet packet)

cacheMessage

protected void cacheMessage(Packet packet)

getEffectiveBootstrapPolicy

protected Policy getEffectiveBootstrapPolicy(NestedPolicy bp)
                                      throws PolicyException
Throws:
PolicyException

unmarshalPolicy

protected PolicySourceModel unmarshalPolicy(String resource)
                                     throws PolicyException,
                                            IOException
Throws:
PolicyException
IOException

cacheOperation

protected final void cacheOperation(Message msg)

resetCachedOperation

protected final void resetCachedOperation()

isSCMessage

protected boolean isSCMessage(Packet packet)

isSCCancel

protected boolean isSCCancel(Packet packet)

isSCRenew

protected boolean isSCRenew(Packet packet)

isAddressingEnabled

protected boolean isAddressingEnabled()

isTrustMessage

protected boolean isTrustMessage(Packet packet)

isRMMessage

protected boolean isRMMessage(Packet packet)

isMakeConnectionMessage

protected boolean isMakeConnectionMessage(Packet packet)

getAction

protected String getAction(Packet packet)

getWSDLOpFromAction

protected WSDLBoundOperation getWSDLOpFromAction(Packet packet,
                                                 boolean isIncomming)

getWSDLOpFromAction

protected WSDLBoundOperation getWSDLOpFromAction(Packet packet,
                                                 boolean isIncomming,
                                                 boolean isFault)

buildProtocolPolicy

protected void buildProtocolPolicy(Policy endpointPolicy,
                                   PolicyAlternativeHolder ph)
                            throws PolicyException
Throws:
PolicyException

constructPolicyHolder

protected SecurityPolicyHolder constructPolicyHolder(Policy effectivePolicy,
                                                     boolean isServer,
                                                     boolean isIncoming)
                                              throws PolicyException
Throws:
PolicyException

constructPolicyHolder

protected SecurityPolicyHolder constructPolicyHolder(Policy effectivePolicy,
                                                     boolean isServer,
                                                     boolean isIncoming,
                                                     boolean ignoreST)
                                              throws PolicyException
Throws:
PolicyException

populateConfigProperties

protected String populateConfigProperties(Set<PolicyAssertion> configAssertions,
                                          Properties props)

loadClass

protected Class loadClass(String classname)
                   throws Exception
Throws:
Exception

getAlgoSuite

protected AlgorithmSuite getAlgoSuite(AlgorithmSuite suite)

getWssAssertion

protected WSSAssertion getWssAssertion(WSSAssertion asser)

addIncomingFaultPolicy

protected abstract void addIncomingFaultPolicy(Policy effectivePolicy,
                                               SecurityPolicyHolder sph,
                                               WSDLFault fault)
                                        throws PolicyException
Throws:
PolicyException

addOutgoingFaultPolicy

protected abstract void addOutgoingFaultPolicy(Policy effectivePolicy,
                                               SecurityPolicyHolder sph,
                                               WSDLFault fault)
                                        throws PolicyException
Throws:
PolicyException

addIncomingProtocolPolicy

protected abstract void addIncomingProtocolPolicy(Policy effectivePolicy,
                                                  String protocol,
                                                  PolicyAlternativeHolder ph)
                                           throws PolicyException
Throws:
PolicyException

addOutgoingProtocolPolicy

protected abstract void addOutgoingProtocolPolicy(Policy effectivePolicy,
                                                  String protocol,
                                                  PolicyAlternativeHolder ph)
                                           throws PolicyException
Throws:
PolicyException

getAction

protected abstract String getAction(WSDLOperation operation,
                                    boolean isIncomming)

resolveAlternative

protected PolicyAlternativeHolder resolveAlternative(Packet packet,
                                                     boolean isSCMessage)


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.