Hi,
I am using Shibboleth Idp to act as Identity provider. I have two specific questions.
Question 1)
I am using SAML2 authentication engine. I would like to log the SAML Request coming from SP AND SAML Response sent from IdP. How do I intercept the request and response using standard Shibboleth idp-metadata.xml or attribute-resolver.xml or handler.xml
======================
Question 2 )
I am able to access the application JAVA objects using script attributes. But I need to send the XML content as additional attributes in SAML authentication response ( in assertion ). For this I am trying to hard code as below. If this works I can extend this to JAVA objects which can return XML.
<resolver:AttributeDefinition id="TestAttr"
xsi:type="Script" xmlns="urn:mace:shibboleth:2.0:resolver:ad">
<resolver:AttributeEncoder xsi:type="SAML2XMLObject"
xmlns="urn:mace:shibboleth:2.0:attribute:encoder" name="TestAttr"
nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" />
<Script><![CDATA[
importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute);
importPackage(Package edu.internet2.middleware.shibboleth.common.xmlobject);
TestAttr = new BasicAttribute("TestAttr");
var text="<node>";
text=text+"<content>test</content>";
text=text+"</node>";
var parser=new DOMParser();
TestAttr.getValues().add(parser.parseFromString(text,'text/xml'));
]]></Script>
</resolver:AttributeDefinition>
I am getting below status message in SAML response
<saml2p:Status>
<saml2p:StatusCode
Value="urn:oasis:names:tc:SAML:2.0:status:Responder">
<saml2p:StatusCode
Value="urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy"/>
</saml2p:StatusCode>
<saml2p:StatusMessage>
Required NameID format not supported
</saml2p:StatusMessage>
</saml2p:Status
==
All I need to create the attributes in the Assertion something like this.
<saml2:AttributeStatement>
<saml2:Attribute
Name="TestAttr1"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml2:AttributeValue
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string">
Test1
</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute
Name="TestAttr2"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml2:AttributeValue
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string">
<i><b> <?xml version="1.0" encoding="ISO-8859-1"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note></b></i>
</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute
Name="SubjectDN"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml2:AttributeValue
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="xs:string">
cn=tt,ou=uu,o=bb,o=oo
</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
Any pointers to generate the XML message in the Attribute. Thanks in advance
        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://shibboleth.1660669.n2.nabble.com/Help-needed-to-create-XML-message-in-SAML-response-attribute-tp7586843.html">Help needed to create XML message in SAML response attribute</a><br/>
Sent from the <a href="http://shibboleth.1660669.n2.nabble.com/Shibboleth-Users-f1660767.html">Shibboleth - Users mailing list archive</a> at Nabble.com.<br/>