Hi Nagi,

See my in-line reply.

On Mon, 2007-07-23 at 22:49 -0400, Par Nagi wrote:
> Hi,
> 
> I have seen a few posts/requests for SAML example(s) using Rahas. I
> haven't seen anything concrete as responses - mostly along the lines
> that code is documentation.
> 
> Does anyone have a simple example that illustrates how to use Rahas to
> have uid/pwd or other credentials mapped to SAML tokens that can then
> be passed to a Service?f
We don't have this ability right now. I have sent a mail to rampart-dev
list about this.

> Also, does Rahas have support to map SAML tokens to JAAS subjects
> within an App server? If it doesn't any suggestions?

There is no straight forward way of doing this right now. SAML Token is
inside the WSSecurityResults. It can be obtained as follows. [1]


Regards,
Dimuthu.


[1]
Vector results = null;
if ((results = (Vector) msgCtx
                .getProperty(WSHandlerConstants.RECV_RESULTS)) == null)
{
        throw new RuntimeException("No security results!!");
} else {
        for (int i = 0; i < results.size(); i++) {
                //Get hold of the WSHandlerResult instance
                WSHandlerResult rResult = (WSHandlerResult)
results.get(i);
                Vector wsSecEngineResults = rResult.getResults();

                for (int j = 0; j < wsSecEngineResults.size(); j++) {
                        //Get hold of the WSSecurityEngineResult
instance
                        WSSecurityEngineResult wser =
(WSSecurityEngineResult)
wsSecEngineResults.get(j);

TAG_SAML_ASSERTION
                        int act =
((Integer)wser.get(WSSecurityEngineResult.TAG_ACTION)).
                            intValue();
                        if((act == WSConstants.ST_UNSIGNED) || (act ==
WSConstants.ST_SIGNED)) {
                                SAMLAssertion ass = (SAMLAssertion) wser
                                                
.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
                        }
                }
        }
}

> Appreciate any information.
> 
> - Nagi
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to