比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

属性管理(登録、変換、リリース方法)

Shibboleth(シボレス)には、基本的には多くの属性をLDAPやDBから取得してリリースするための設定が既に入っており、これらのコメントアウトを解除して有効化するだけで実行することができます。シボレスには、基本的には多くの属性をLDAPやDBから取得してリリースするための設定が既に入っており、これらのコメントアウトを解除して有効化するだけで実行することができます。
また、属性の変換機能として、”@nii.ac.jp”といったスコープの付与、値の変換、固定値の割り当てや、スクリプトを利用した変換等が可能です。
さらに、リリース制御では、サイトとしてのポリシー、各個人のポリシーによる制御や、各SPに対応したリリース制御等が可能です。

以下では、新たなIDや属性の追加、そのリリースの方法について説明します。



...

IDの追加方法

以下の利用者をLDAPへ登録する例を示します。

Uid
uiduserPassword
eduPersonPrincipalName
oueduPersonAffiliation
testuid4testpw4test_eppn_4
test004test004technologystudent

...

1. ldifファイル(sample1.ldif)の作成

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
dn: ou=technology,o=test_o,dc=ac,c=JP
objectClass: organizationalUnit
ou: technology

# test004# test_eppn_4, technology, test_o, ac, JP
dn: eduPersonPrincipalName=test_eppn_4uid=test004,ou=technology,o=test_o,dc=ac,c=JP
objectClass: eduPerson
objectClass: inetOrgPerson
eduPersonPrincipalName: test_eppn_4
ou: technology
sn: test_sn_4
cn: test_cn_4
uid: testuid4test004
userPassword: testpw4test004
eduPersonAffiliation: student 

...

 


2. 上記1のldifファイルを用いた登録

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
#ldapadd# ldapadd -x -h localhost -D "cn=olmgr, o=test_o,dc=ac,c=JP" -w csildap -f example1sample1.ldif

...

 


...

属性の追加方法

利用者に「displayName」属性を追加する例を示します。

...

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
dn: eduPersonPrincipalName=test_eppn_4uid=test004,ou=technology,o=test_o,dc=ac,c=JP
changetype: modify
add : displayName
displayName: Test4

...


2. 上記1のldifファイルを用いた登録

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# ldapmodify -x -h localhost -D "cn=olmgr, o=test_o,dc=ac,c=JP" -w csildap -f example2sample2.ldif

...

 

...

属性のリリース方法

先にで追加した「displayName」属性をSPへリリースする例を示します。先に追加した「displayName」属性をSPへリリースする例を示します。

1. スキーマの確認

・/etc/openldap/schema配下にスキーマファイルがあります。
・「displayName」属性は、/etc/openldap/schema/inetorgperson.schemaにて以下のように定義されています。schemaにて以下のように定義されています。赤字で示されている部分が displayName の oid です。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
(中略)
# displayName
# When displaying an entry, especially within a one-line summary list, it 
# is useful to be able to identify a name to be used. Since other attri-
# bute types such as 'cn' are multivalued, an additional attribute type is
# needed. Display name is defined for this purpose. attributetype ( 2.16.840.1.113730.3.1.241 NAME 'displayName' DESC 'RFC2798: preferred name to be used when displaying entries' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE ) (中略)

...


2. /opt/shibboleth-idp/conf/attribute-resolver.xmlへの登録

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

<AttributeResolver


        xmlns="urn:mace:shibboleth:2.0:resolver"

xmlns:resolver="urn:mace:shibboleth:2.0:resolver"   xmlns:


        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:pc="urn:mace:shibboleth:2.0:resolver:pc" xmlns:ad="urn:mace:shibboleth:2.0:resolver:ad" xmlns:dc="urn:mace:shibboleth:2.0:resolver:dc" xmlns:enc="urn:mace:shibboleth:2.0:attribute:encoder" xmlns:sec="urn:mace:shibboleth:2.0:security"


        xsi:schemaLocation="urn:mace:shibboleth:2.0:resolver

classpath

http:/

schema

/shibboleth

-2.0-attribute-resolver.xsd urn:mace:shibboleth:2.0:resolver:pc classpath:/schema/shibboleth-2.0-attribute-resolver-pc.xsd urn:mace:shibboleth:2.0:resolver:ad classpath:/schema/shibboleth-2.0

.net/schema/idp/shibboleth-attribute-resolver

-ad

.xsd

urn:mace:shibboleth:2.0:resolver:dc classpath:/schema/shibboleth-2.0-attribute-resolver-dc.xsd urn:mace:shibboleth:2.0:attribute:encoder classpath:/schema/shibboleth-2.0-attribute-encoder.xsd urn:mace:shibboleth:2.0:security classpath:/schema/shibboleth-2.0-security.xsd"> (中略)   <resolver:AttributeDefinition id="displayName"

">

(中略)

    <AttributeDefinition xsi:type="Simple"

xmlns="urn:mace:shibboleth:2.0:resolver:ad"      sourceAttributeID="displayName"> <resolver:Dependency

id="displayName">
        <InputDataConnector ref="myLDAP" attributeNames="

/> <resolver:AttributeEncoder

displayName"/>
        <AttributeEncoder xsi:type="SAML1String"

xmlns

name="urn:mace

:shibboleth:2.0:attribute

:

encoder"        name="urn:mace:

dir:attribute-def:displayName" encodeType="

/> <resolver:AttributeEncoder

false" />
        <AttributeEncoder xsi:type="SAML2String"

xmlns="urn:mace:shibboleth:2.0:attribute:encoder"        name

name="urn:oid:2.16.840.1.113730.3.1.241"

 ←1のoid        friendlyName

friendlyName="displayName" encodeType="false"

/>

   </resolver:AttributeDefinition> (中略)


    </AttributeDefinition> "displayName" の AttributeDefinition を追加(SAML2Stringのnameでは1.で確認したoidを指定)

(中略)

</AttributeResolver>

※ 途中のSAML1Stringについては、URNとして登録されていない属性の場合はこの行自体を削除してください。 

3. /opt/shibboleth-idp/conf/attribute-filter.xmlへの登録

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
(中略) <!-- Release the transient ID to anyone -->     <AttributeFilterPolicy

<AttributeFilterPolicyGroup id="

releaseTransientIdToAnyone">         <PolicyRequirementRule xsi:type="basic:ANY" /> (中略)         <AttributeRule attributeID="displayName">
            <PermitValueRule xsi:type="basic:ANY" /> 追加
         </AttributeRule>
(中略) </AttributeFilterPolicy> (中略)

..."
        xmlns="urn:mace:shibboleth:2.0:afp"

(中略)

    <AttributeFilterPolicy id="...">

(中略)

<AttributeRule attributeID="displayName" permitAny="true" />
      ↑ "displayName" の AttributeRule を追加

(中略)

</AttributeFilterPolicy>

(中略)

 </AttributeFilterPolicyGroup>