Shib3IdpAttrib
A lap korábbi változatát látod, amilyen Molnarp(AT)niif.hu (vitalap | szerkesztései) 2015. július 3., 10:35-kor történt szerkesztése után volt.
Shibboleth 3 IdP attribútum feloldás beállítása
Vonatkozó állományok:
- {idp.home}/conf/attribute-resolver.xml
- {idp.home}/conf/idp.properties
Az alábbiakban LDAP címtárat használunk forrás adatbázisként az attribútumok feloldásához. Az {idp.home}/conf/ldap.properties állományban beállított kapcsolódási paraméterek az attribútum feloldáshoz is használhatók.
Az {idp.home}/conf/attribute-resolver-ldap.xml állomány jó kiindulási pont, cseréljük le erre az {idp.home}/conf/attribute-resolver.xml állományt.
cd /opt/shibboleth-idp/conf # vagy ahová az IdP telepítésre került
cp attribute-resolver.xml attribute-resolver-simple.xml # másolat készítése
cp attribute-resolver-ldap.xml attribute-resolver.xml
Szerkesszük az alábbiak szerint az {idp.home}/conf/attribute-resolver.xml állományt. A mail attribútumot már tartalmazza a beállító állomány. Az alábbi példában az sn és givenName attribútumokat vesszük fel.
1 <!-- ========================================== -->
2 <!-- Attribute Definitions -->
3 <!-- ========================================== -->
4
5 <!-- ... további tartalom ... -->
6
7 <!--
8 In the rest of the world, the email address is the standard identifier,
9 despite the problems with that practice. Consider making the EPPN value
10 the same as your official email addresses whenever possible.
11 -->
12 <resolver:AttributeDefinition id="mail" xsi:type="ad:Simple" sourceAttributeID="mail">
13 <resolver:Dependency ref="myLDAP" />
14 <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:mail" encodeType="false" />
15 <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:0.9.2342.19200300.100.1.3" friendlyName="mail" encodeType="false" />
16 </resolver:AttributeDefinition>
17
18 <resolver:AttributeDefinition id="sn" xsi:type="ad:Simple" sourceAttributeID="sn">
19 <resolver:Dependency ref="myLDAP" />
20 <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:sn" encodeType="false" />
21 <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:2.5.4.4" friendlyName="sn" encodeType="false" />
22 </resolver:AttributeDefinition>
23
24 <resolver:AttributeDefinition id="givenName" xsi:type="ad:Simple" sourceAttributeID="givenName">
25 <resolver:Dependency ref="myLDAP" />
26 <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:givenName" encodeType="false" />
27 <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:2.5.4.42" friendlyName="givenName" encodeType="false" />
28 </resolver:AttributeDefinition>
29
30 <!-- ========================================== -->
31 <!-- Data Connectors -->
32 <!-- ========================================== -->
- A 18, 24. sorban adjuk meg az attribútum nevét, valamint, hogy egyszerű attribútumról van szó, nem szükséges átalakítani.
- A 19, 25. sor hivatkozik a használandó LDAP kapcsolatra.
- A 21, 27. sorbeli SAML2String előállításához szükséges oid megegyezik az attribútum LDAP sémabeli oid-jával.