„Shib3IdpAttrib” változatai közötti eltérés
(Új oldal, tartalma: „Shibboleth 3 IdP attribútum feloldás beállítása”) |
|||
1. sor: | 1. sor: | ||
Shibboleth 3 IdP attribútum feloldás beállítása | Shibboleth 3 IdP attribútum feloldás beállítása | ||
+ | |||
+ | '''Vonatkozó állományok:''' | ||
+ | :<tt>{idp.home}/conf/attribute-resolver.xml</tt> | ||
+ | :<tt>{idp.home}/conf/idp.properties</tt> | ||
+ | |||
+ | Az alábbiakban LDAP címtárat használunk forrás adatbázisként az attribútumok feloldásához. Az <tt>{idp.home}/conf/ldap.properties</tt> állományban beállított kapcsolódási paraméterek az attribútum feloldáshoz is használhatók. | ||
+ | |||
+ | Az <tt>{idp.home}/conf/attribute-resolver-ldap.xml</tt> állomány jó kiindulási pont, cseréljük le erre az <tt>{idp.home}/conf/attribute-resolver.xml</tt> állományt. | ||
+ | <source lang="bash"> | ||
+ | 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 | ||
+ | </source> | ||
+ | |||
+ | Szerkesszük az alábbiak szerint az <tt>{idp.home}/conf/attribute-resolver.xml</tt> á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. | ||
+ | <source lang="xml" line> | ||
+ | <!-- ========================================== --> | ||
+ | <!-- Attribute Definitions --> | ||
+ | <!-- ========================================== --> | ||
+ | |||
+ | <!-- ... további tartalom ... --> | ||
+ | |||
+ | <!-- | ||
+ | In the rest of the world, the email address is the standard identifier, | ||
+ | despite the problems with that practice. Consider making the EPPN value | ||
+ | the same as your official email addresses whenever possible. | ||
+ | --> | ||
+ | <resolver:AttributeDefinition id="mail" xsi:type="ad:Simple" sourceAttributeID="mail"> | ||
+ | <resolver:Dependency ref="myLDAP" /> | ||
+ | <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:mail" encodeType="false" /> | ||
+ | <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:0.9.2342.19200300.100.1.3" friendlyName="mail" encodeType="false" /> | ||
+ | </resolver:AttributeDefinition> | ||
+ | |||
+ | <resolver:AttributeDefinition id="sn" xsi:type="ad:Simple" sourceAttributeID="sn"> | ||
+ | <resolver:Dependency ref="myLDAP" /> | ||
+ | <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:sn" encodeType="false" /> | ||
+ | <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:2.5.4.4" friendlyName="sn" encodeType="false" /> | ||
+ | </resolver:AttributeDefinition> | ||
+ | |||
+ | <resolver:AttributeDefinition id="givenName" xsi:type="ad:Simple" sourceAttributeID="givenName"> | ||
+ | <resolver:Dependency ref="myLDAP" /> | ||
+ | <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:givenName" encodeType="false" /> | ||
+ | <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:2.5.4.42" friendlyName="givenName" encodeType="false" /> | ||
+ | </resolver:AttributeDefinition> | ||
+ | |||
+ | <!-- ========================================== --> | ||
+ | <!-- Data Connectors --> | ||
+ | <!-- ========================================== --> | ||
+ | </source> | ||
+ | * 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. |
A lap 2015. július 3., 10:35-kori változata
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.