Using cn (commonName) as NameID

Robo Burned robo at list.ru
Tue Nov 24 07:49:53 EST 2015


I need 'cn' or commonName to be placed into Subject / NameID of SAML response.
I've added the attribute definition to the attribute-resolver.xml.
 (I see no example for cn in attribute-resolver-full.xml so I got
 the urn:oid of cn field from external resources)

<resolver:AttributeDefinition id="cn" xsi:type="ad:Simple" sourceAttributeID="cn">
          <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:cn" encodeType="false" />
          <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:2.5.4.3" friendlyName="cn" encodeType="false" />
</resolver:AttributeDefinition>
I've added attribute to attribute-filter.xml to the AttributeFilterPolicy section.
<AttributeFilterPolicy id="example1">
 	<PolicyRequirementRule xsi:type="OR"> ... </PolicyRequirementRule>
   <AttributeRule attributeID="cn">
               <PermitValueRule xsi:type="ANY" />
          </AttributeRule>
</AttributeFilterPolicy>
In logs I see the following error.  What is wrong with the context?
2015-11-24 15:45:41,871 - DEBUG [net.shibboleth.idp.profile.interceptor.impl.SelectProfileInterceptorFlow:84] - Profile Action SelectProfileInterceptorFlow: Selecting flow intercept/attribute-release
2015-11-24 15:45:42,059 - DEBUG [net.shibboleth.idp.consent.storage.impl.ConsentSerializer:104] - symbolics '{postOfficeBox=115, commonName=105, eduPersonPrimaryAffiliation=305, eduPersonNickname=302, mobileNumber=103, title=112, initials=118, preferredLanguage=205, eduPersonPrimaryOrgUnitDN=306, eduPersonEntitlement=301, street=109, homePhone=101, departmentNumber=200, employeeType=203, eduPersonScopedAffiliation=308, employeeNumber=202, jpegPhoto=204, postalCode=114, postalAddress=113, eduPersonOrgDN=303, pagerNumber=104, eduPersonPrincipalName=307, eduPersonAffiliation=300, stateProvince=108, homePostalAddress=102, surname=106, displayName=201, eduPersonAssurance=309, email=100, locality=107, eduPersonOrgUnitDN=304, telephoneNumber=116, givenName=117, organizationalUnit=111, organizationName=110}'
2015-11-24 15:45:42,199 - DEBUG [net.shibboleth.idp.consent.flow.impl.InitializeConsentContext:47] - Profile Action InitializeConsentContext: Created consent context 'ConsentContext{previousConsents={}, chosenConsents={}}'
2015-11-24 15:45:42,215 - DEBUG [net.shibboleth.idp.consent.flow.ar.impl.InitializeAttributeReleaseContext:47] - Profile Action InitializeAttributeReleaseContext: Created attribute release context 'AttributeReleaseContext{consentableAttributes={}}'
2015-11-24 15:45:42,231 - DEBUG [net.shibboleth.idp.consent.flow.ar.impl.AbstractAttributeReleaseAction:148] - Profile Action PopulateAttributeReleaseContext: Found attributeContext 'null'
2015-11-24 15:45:42,231 - ERROR [net.shibboleth.idp.consent.flow.ar.impl.AbstractAttributeReleaseAction:150] - Profile Action PopulateAttributeReleaseContext: Unable to locate attribute context
2015-11-24 15:45:42,246 - WARN [org.opensaml.profile.action.impl.LogEvent:76] - An error event occurred while processing the request: InvalidProfileContext

Best regards,

Robo Burned
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20151124/b4041d1a/attachment-0001.html>


More information about the users mailing list