You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Shlomi Aflalo <sh...@exelate.com> on 2008/06/03 13:13:15 UTC

getting the signing key alias from within a service business logic

Hi,
I have a service with ws-security policy and I want to get, from within 
the service business logic, the alias of the key which was used for 
signing the message.
I tried reading it from the MessageContext 
(msgCtx.getProperty(WSHandlerConstants.RECV_RESULTS)), but didn't find 
it there (or I didn't know where to look...)

I have Axis 2 1.4 and Rampart 1.4.
This is the policy I use for the service:
<sp:SymmetricBinding>
                <wsp:Policy>
                    <sp:ProtectionToken>
                        <wsp:Policy>
                            <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                                <wsp:Policy>
                                    <sp:WssX509V3Token10/>
                                </wsp:Policy>
                            </sp:X509Token>
                        </wsp:Policy>
                    </sp:ProtectionToken>
                    <sp:AlgorithmSuite>
                        <wsp:Policy>
                            <sp:Basic256/>
                        </wsp:Policy>
                    </sp:AlgorithmSuite>
                    <sp:Layout>
                        <wsp:Policy>
                            <sp:Lax/>
                        </wsp:Policy>
                    </sp:Layout>
                    <sp:IncludeTimestamp/>
                    <sp:OnlySignEntireHeadersAndBody/>
                </wsp:Policy>
            </sp:SymmetricBinding>
            <sp:SignedParts>
                <sp:Body/>
            </sp:SignedParts>
            <sp:SignedSupportingTokens>
                <wsp:Policy>
                    <sp:UsernameToken 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                        <wsp:Policy>
                            <sp:WssUsernameToken10/>
                        </wsp:Policy>
                    </sp:UsernameToken>
                </wsp:Policy>
            </sp:SignedSupportingTokens>
            <sp:Wss11>
            <wsp:Policy>
                </wsp:Policy>
            </sp:Wss11>

Thanks,
Shlomi.



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org