script for defining right "cn" attribute.

Josef Karliak karliak at ajetaci.cz
Fri Jan 15 01:23:13 EST 2016


  Good morning,
  I need to define a "cn", existing "cn" from AD LDAP provides bad value
(login, wtf???).
  So I define a "cn" by this script in the "attribute-resolver.xml":
<resolver:AttributeDefinition xsi:type="Script"
xmlns="urn:mace:shibboleth:2.0:resolver:ad"
                              id="cn">
    <resolver:Dependency ref="givenName" />
    <resolver:Dependency ref="sn" />

    <Script><![CDATA[
        importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
        cn = new BasicAttribute("cn");
        cn.getValues().add(givenName.getValues().get(0) + " " +
sn.getValues().get(0));
    ]]></Script>
</resolver:AttributeDefinition>

  I see a "cn" attribute in the idp-process.log, but it seems to be empty,
SP test page do not display this attribute. Attributes used by this
script are diplayed.

givenName:	Josef
sn:	Karliak


07:10:34.716 - INFO [Shibboleth-Audit:1028] -
20160115T061034Z|urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect|_f0b1e7ad125d690a6791e3a62195431b|https://edev.cesnet.cz/sp/shibboleth|urn:mace:shibboleth:2.0:profiles:saml2:sso|https://idp1.fnhk.cz/idp/shibboleth|urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST|_cec963082ac798aefeed26bf8549c9ff|karlijos|urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport|eduPersonPrincipalName,mail,sn,organizationName,transientId,unstructuredName,givenName,eduPersonTargetedID,email,cn,telephoneNumber,eduPersonEntitlement,displayName,commonNameASCII,|_df17438d652ae6a69badd1a9b348ba89||


  Thanks and best regards
  J.Karliak

-- 
Ma domena pouziva zabezpeceni a kontrolu SPF (www.openspf.org) a
DomainKeys/DKIM (s ADSP) a implementaci DMARC. Pokud mate problemy s
dorucenim emailu, zacnete pouzivat metody overeni puvody emailu
zminene vyse. Dekuji.
My domain use SPF (www.openspf.org) and DomainKeys/DKIM (with ADSP)
policy and implementation of the DMARC. If you've problem with sending
emails to me, start using email origin methods mentioned above. Thank
you.



More information about the users mailing list