<div dir="ltr">Hi<div><br></div><div style>I am trying to set my nameID as my principalName however I am having very litle succes with it. My principalName is set with the ldapLoginModule and it is just the username (A string)</div>
<div style><br></div><div style>If I understand correct TransientId and PersistentId require a mail like format and because I am getting something that is just any string, I want to get in unspecified format.</div><div style>
<br></div><div style>What I have done so far:</div><div style><br></div><div style>- Made sure that only &quot;&lt;NameIDFormat&gt;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&lt;/NameIDForma&gt;&quot; is found in my idp-metadata.xml (I commented away the others)</div>
<div style>- Made sure to add only unspecified nameID (As above) to my sp-metadata.xml</div><div style>- Commented away the original attribute called transientId which contains 2 attribute encoders of transient format in attribute-resolver.xml</div>
<div style>- Added the following attribute to attribute-resolver.xml</div><div style>   &lt;resolver:AttributeDefinition xsi:type=&quot;ad:PrincipalName&quot; id=&quot;pNameID&quot; &gt;</div><div>                &lt;resolver:AttributeEncoder xsi:type=&quot;enc:SAML2StringNameID&quot; nameFormat=&quot;urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified&quot; /&gt;</div>
<div>        &lt;/resolver:AttributeDefinition&gt;</div><div><br></div><div style>- Commented away the attributeFilterPolicy called &quot;releaseTransientIdToAnyone&quot; in attribute-filter.xml</div><div style>- Added the following attributeFilterPolicy to attribute-filter.xml</div>
<div style>   &lt;afp:AttributeFilterPolicy&gt;</div><div>        &lt;afp:PolicyRequirementRule xsi:type=&quot;basic:AttributeRequesterString&quot; value=&quot;<a href="https://myhost.com/">https://myhost.com/</a>&quot;/&gt;</div>
<div><br></div><div>        &lt;afp:AttributeRule attributeID=&quot;pNameID&quot;&gt;</div><div>            &lt;afp:PermitValueRule xsi:type=&quot;basic:ANY&quot; /&gt;</div><div>        &lt;/afp:AttributeRule&gt;</div><div>
    &lt;/afp:AttributeFilterPolicy&gt;</div><div><br></div><div><br></div><div style>It feels to me that this should be enough, yet in debug logs I keept seeing the following message:</div><div style><br></div><div style>
No attribute of principal &#39;someString&#39; can be encoded in to a NameIdentifier of required format &#39;urn:oasis:names:tc:SAML:2.0:nameid-format:transient&#39; for relying party &#39;<a href="https://myhost.com/">https://myhost.com/</a>&#39;<br>
</div><div style><br></div><div style><br></div><div style>I don&#39;t understand why it keeps saying that it wants a transient format (Which I believe is what is stopping it from adding to nameId due to no mail format).</div>
<div style><br></div><div style>Any help is appreciated, am I doing something wrong?</div><div style><br></div><div style>I based my actions on the following page <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/IdPAddAttributeExamples">https://wiki.shibboleth.net/confluence/display/SHIB2/IdPAddAttributeExamples</a> with the small change that I am using a principalName attributeDefinition type instead of Simple.</div>
</div>