Help needed to create XML message in SAML response attribute

Cantor, Scott cantor.2 at osu.edu
Mon May 20 10:49:28 EDT 2013


> I want to store the same SAML response in the database before relaying it to
> SP. For this I have created JAVA DB interface. How do I intercept and send
> the SAML response alone to JAVA DBI before relaying to the SP.

Using the logging layer? That seems like a logical choice. Using some kind of logging appender for logback could be made to do something fancy.
 
> I am completely new to SAML world

Extending the IdP doesn't have anything to do with SAML really.

> and is there any documentation on how
> to write custom attribute. 

Just a little bit in the wiki. Mostly it's copying existing code and understanding Spring and XML very well.
 
> How do resolve my NameIDFormat issue since I need to send few String
> attributes and one XML message in SAML response.

If the SP insists on requesting a format, then you have to support that format. The "persistent" NameID type is implemented in the IdP using one of a couple of plugin options referred to as StoredId or ComputedId data connectors. It is unlikely that the SP really needs that and it's most likely misconfigured. You can't fix that, and there is no option to just violate the spec and ignore the requested format.

> So if I want to send the SubjectDN, couple of application specific
> attributes ( probably as xsi:type="SAML2String") and one xml message in
> SAML
> response, what is the best approach. how do I configure my
> attribute-resolver/filter.xml files.

You read the documentation, basically, and ask a specific question about something in it you don't understand.

If you want to send a DN as a NameID, you can find documentation on custom NameID use in the wiki. Generating and encoding string attributes is also documented. The use of XML in a value is not provided for you and requires writing custom code.

> To send the xml messages in the attribute what should be the xsi:type in
> attribute-resolver/fileter xml ??

I'm telling you again, you don't. SAML implementaions are not generally capable of handling XML-valued attributes and using them is generally a bad idea.

But if you insist on doing so, you DO NOT set xsi:type at all. The syntax of an attribute in SAML is based on its name, not on xsi:type.

-- Scott




More information about the users mailing list