<div dir="ltr"><div><div><div><div>Hi everybody,<br><br></div>I am trying to return some attributes from IdP in authentication response which are in Japanese, but it looks like only <b>question marks</b> instead of real characters arrive to SP.<br><br>attribute-resolver.xml extract:<br><br><span style="color:rgb(7,55,99)"><resolver:AttributeDefinition id="userName" xsi:type="ad:Scoped" scope="%{idp.scope}" sourceAttributeID="userName"><br>    <resolver:Dependency ref="aaiaut" /><br>    <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:com.example:userName" encodeType="false" /><br>    <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:com.example:userName" friendlyName="userName" encodeType="false" /><br></resolver:AttributeDefinition><br><br><resolver:DataConnector id="myDataConnector" xsi:type="dc:Script"><br>    <dc:Script><![CDATA[<br>        importPackage(Packages.net.shibboleth.idp.attribute);<br>        importPackage(Packages.java.util);<br>        importPackage(Packages.java.lang);<br>        importClass(Packages.com.example.contexts.UserCredentialsContext);<br>        ucContext = resolutionContext.getParent().getSubcontext(UserCredentialsContext, true);<br>        userName = new IdPAttribute("userName");<br>        userNameValues = new HashSet(1);<br>        userNameValues.add(new StringAttributeValue(ucContext.getuserName()));<br>        userName.setValues(userNameValues);<br>        connectorResults.add(userName);<br>    ]]></dc:Script><br></resolver:DataConnector></span><br><br>UserCredentialsContext is populated and stored into profileRequestContext on one of the steps of the flow. It is just a plain POJO.<br><br>attribute-filter.xml extract:<br><br><span style="color:rgb(7,55,99)"><afp:AttributeFilterPolicy id="myFilter"><br>    <!-- Make this rule trigget in all cases --><br>    <afp:PolicyRequirementRule xsi:type="basic:ANY" /><br>    <!-- Release `userName` under all conditions --><br>    <afp:AttributeRule attributeID="userName"><br>        <afp:PermitValueRule xsi:type="basic:ANY" /><br>    </afp:AttributeRule><br></afp:AttributeFilterPolicy></span><br><br></div>This is what decoded response looks like on the SP side (by the way SP is Spring Security Saml)<br><br><span style="color:rgb(7,55,99)"><?xml version="1.0" encoding="UTF-8"?><br><saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_e695a8d590cd07ecb7ee3998c7298404"<br>                 IssueInstant="2016-03-01T05:33:40.640Z" Version="2.0"><br>    <saml2:Issuer>...</saml2:Issuer><br>      ...<br>      <saml2:AttributeStatement><br>        <saml2:Attribute FriendlyName="userName" Name="urn:com.example:userName"<br>                         NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><br>            <saml2:AttributeValue>???????</saml2:AttributeValue><br>        </saml2:Attribute><br>    </saml2:AttributeStatement><br></saml2:Assertion></span><br><br></div>Any ideas how to get it returned in the correct encoding? <br><br></div>Thanks!<br><div><div><div><br><br><br></div></div></div></div>