« Return to Thread: SAML 2.0 Token with AuthnStatement _and_ AttributeStatement

Re: SAML 2.0 Token with AuthnStatement _and_ AttributeStatement

by metro-3 :: Rate this Message:

Reply to Author | View in Thread

>
> Can you point me to the right direction, on how to do
> this with an own STSTokenProvider?

> Would OpenSAML be
> helpful?

You just need to override the
createSAML20Assertion() method

in our DefaultSAMLTokenProvider.

We create AUthenticationStatement or AttributeStatement depending on if the
if (claimedAttrs.isEmpty()) or not.

You just remove the check to create the both in the same time. More precisely,

from:

if (claimedAttrs.isEmpty()){
                AuthnContext ctx = samlFac.createAuthnContext(authnCtx, null);
                final AuthnStatement statement = samlFac.createAuthnStatement(issueInst, null, ctx, null, null);
                statements.add(statement);
            }else{
                final AttributeStatement statement = samlFac.createAttributeStatement(null);
                statements.add(statement);
            }

to


                AuthnContext ctx = samlFac.createAuthnContext(authnCtx, null);
                final AuthnStatement statement = samlFac.createAuthnStatement(issueInst, null, ctx, null, null);
                statements.add(statement);
       
                final AttributeStatement statement = samlFac.createAttributeStatement(null);
                statements.add(statement);
     
You can plugin you custom STSTokenProvider in the same as STSAttributeProvider:
http://blogs.sun.com/trustjdg/entry/create_customer_sts_with_wsit

> Would OpenSAML be
> helpful?
 No. It is a low level library.

Thanks!

Jianodng
[Message sent by forum member 'jdg6688' (jdg6688)]

http://forums.java.net/jive/thread.jspa?messageID=354763

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: SAML 2.0 Token with AuthnStatement _and_ AttributeStatement