Hi,
I have been given a WSDL to generate a client against which uses a security policy. This is my first time using a security policy and although I've read about it (basic theory), putting it into practice with specific elements and a specific technology isn't straight forward (to me anyway).
I generated the client using wsimport and there is nothing in the generated classes regarding the security policy. Is this expected?
Can anyone recommend a good tutorial/how to for someone implementing this for the first time? I am using Eclipse as my IDE so something that is not NetBeans specific would be much appreciated.
If it helps, the security portion of the WSDL looks like this:
<wsp:Policy xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
xmlns:wsaw3c="http://www.w3.org/2005/08/addressing" xmlns:ssp="http://schemas.sun.com/2006/03/wss/server"
xmlns:sunwsp="http://java.sun.com/xml/ns/wsit/policy" wsu:Id="MyServicePortBindingPolicy">
<sp:SymmetricBinding>
<wsp:Policy>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic128 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:IncludeTimestamp />
<sp:Layout>
<wsp:Policy>
<sp:Lax />
</wsp:Policy>
</sp:Layout>
<sp:OnlySignEntireHeadersAndBody />
<sp:ProtectionToken>
<wsp:Policy>
<sp:IssuedToken
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:RequireInternalReference />
</wsp:Policy>
<sp:Issuer>
<wsaw3c:Address>https://server.com:8443/service</wsaw3c:Address>
<wsaw3c:Metadata>
<ns1:Metadata
xmlns:ns1="http://schemas.xmlsoap.org/ws/2004/09/mex">
<ns1:MetadataSection>
<ns1:MetadataReference>
<wsaw3c:Address>https://server.com:8443/service</wsaw3c:Address>
</ns1:MetadataReference>
</ns1:MetadataSection>
</ns1:Metadata>
</wsaw3c:Metadata>
</sp:Issuer>
<sp:RequestSecurityTokenTemplate>
<ns2:KeySize
xmlns:ns2="http://docs.oasis-open.org/ws-sx/ws-trust/200512">128</ns2:KeySize>
<ns3:KeyType
xmlns:ns3="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</ns3:KeyType>
<ns4:TokenType
xmlns:ns4="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</ns4:TokenType>
</sp:RequestSecurityTokenTemplate>
</sp:IssuedToken>
</wsp:Policy>
</sp:ProtectionToken>
</wsp:Policy>
</sp:SymmetricBinding>
<sp:Trust13>
<wsp:Policy>
<sp:MustSupportIssuedTokens />
<sp:RequireClientEntropy />
<sp:RequireServerEntropy />
</wsp:Policy>
</sp:Trust13>
<sp:Wss11>
<wsp:Policy>
<sp:MustSupportRefEncryptedKey />
<sp:MustSupportRefIssuerSerial />
<sp:MustSupportRefThumbprint />
</wsp:Policy>
</sp:Wss11>
<wsam:Addressing />
</wsp:Policy>
<wsp:Policy xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
wsu:Id="MyServicePortBinding_getMyService_Input_Policy">
<sp:EncryptedParts>
<sp:Body />
</sp:EncryptedParts>
<sp:SignedParts>
<sp:Body />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="ReplyTo" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="To" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="From" />
<sp:Header Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"
Name="AckRequested" />
<sp:Header Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"
Name="CreateSequence" />
<sp:Header Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"
Name="Sequence" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="MessageID" />
<sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"
Name="SequenceAcknowledgement" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="Action" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="RelatesTo" />
</sp:SignedParts>
</wsp:Policy>
<wsp:Policy xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
wsu:Id="MyServicePortBinding_getMyService_Output_Policy">
<sp:EncryptedParts>
<sp:Body />
</sp:EncryptedParts>
<sp:SignedParts>
<sp:Body />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="ReplyTo" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="To" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="From" />
<sp:Header Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"
Name="AckRequested" />
<sp:Header Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"
Name="CreateSequence" />
<sp:Header Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"
Name="Sequence" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="MessageID" />
<sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
<sp:Header Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"
Name="SequenceAcknowledgement" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="Action" />
<sp:Header Namespace="http://www.w3.org/2005/08/addressing"
Name="RelatesTo" />
</sp:SignedParts>
</wsp:Policy>