Shibboleth IdP 3に関する情報をまとめているページです。
OS | Java | Servlet | IdP |
---|---|---|---|
CentOS 6.5 | Oracle Java 8u45 + JCE Unlimited Strength Jurisdiction Policy Files | Apache Tomcat 8.0.23 | Shibboleth IdP 3.1.1 |
//saml2:Subject/saml2:NameID
はattribute-filter.xml
に記述しなくてもsaml-nameid.properties
とsaml-nameid.xml
の設定により、SPメタデータの<NameIDFormat>に従って
下記の通り送信します。
SPメタデータの<NameIDFormat> の値 | 送信する属性 | |
---|---|---|
urn:oasis:names:tc:SAML:2.0:nameid-format:transient | transient-id | |
urn:oasis:names:tc:SAML:2.0:nameid-format:persistent | persistent-id
| |
<NameIDFormat> がない |
|
<NameIDFormat>
がないSPの場合と<NameIDFormat>がurn:oasis:names:tc:SAML:2.0:nameid-format:persistent
の場合の//saml2:Subject/saml2:NameID
の例を下記に示す。
<NameIDFormat>
がないSPの場合
<saml2:Subject> <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" NameQualifier="https://idp.example.ac.jp/idp/shibboleth" SPNameQualifier="https://sp1.example.jp/shibboleth-sp">AAdzZWNyZXQxgUnobM3/AN3fn8DfZPDqBp/GnKNxc5JR4nxXAxDAXZZSg0AZSrDh1Sip1fl9JGYrm2NWjl8zHKxHmbsgS/mFZ1ZlSYQ2U/Kz7tCQ+SDswixwLRcGg3tDvVSAY8imKSrElGWSm5gMM45D4rkeQONJYr7gQZ13</saml2:NameID> |
<NameIDFormat>がurn:oasis:names:tc:SAML:2.0:nameid-format:persistent
の場合
<saml2:Subject> <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" NameQualifier="https://idp.example.ac.jp/idp/shibboleth" SPNameQualifier="https://sp2.example.jp/shibboleth-sp">oiUiApwGnBP8pS3HZJ02ZW/aOTI=</saml2:NameID> |
transient-id
のデフォルトはCryptoTransient
に変更になりました。CryptoTransient
の使用例を下記に示します。
IdP 2系と同じ短いTransient
を使いたい場合は下記の変更を行います。
saml-nameid.properties
idp.transientId.generator
をアンコメントして、値をshibboleth.StoredTransientIdGenerator
に変更します。
# Set to shibboleth.StoredTransientIdGenerator for server-side storage idp.transientId.generator = shibboleth.StoredTransientIdGenerator |
Transient
の使用例を下記に示します。
<saml2:Subject> <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" NameQualifier="https://idp.example.ac.jp/idp/shibboleth" SPNameQualifier="https://sp1.example.jp/shibboleth-sp">_f358fb015b9b45c7d18a4a2647e79c33</saml2:NameID> |
computedIdでの設定を下記に示します。
saml-nameid.xml
<ref bean="shibboleth.SAML2PersistentGenerator" />
をアンコメントして有効にします。
<!-- Uncommenting this bean requires configuration in saml-nameid.properties. --> <!-- --> <ref bean="shibboleth.SAML2PersistentGenerator" /> <!-- --> |
saml-nameid.properties
idp.persistentId.generatorのデフォルトはComputedIdの設定のため、idp.persistentId.sourceAttribute
とidp.persistentId.salt
のみを設定します。
# Set to shibboleth.StoredPersistentIdGenerator for db-backed storage # and uncomment/name the PersistentIdStore bean to use #idp.persistentId.generator = shibboleth.ComputedPersistentIdGenerator # Otherwise for computed PersistentIDs set the source attribute and salt. idp.persistentId.sourceAttribute = uid4persistentId idp.persistentId.salt = changethistosomethingrandom |
attribute-resolver.xml
とattribute-filter.xml
idp.persistentId.sourceAttribute
の値をattribute-resolver.xml
の//resolver:AttributeDefinition
で定義して、attribute-filter.xml
で送信設定を行います。
<!-- ========================================== --> <!-- PersistentId Definition --> <!-- ========================================== --> <!-- Attribute Definition for %{idp.persistentId.sourceAttribute} --> <resolver:AttributeDefinition id="%{idp.persistentId.sourceAttribute}" xsi:type="ad:Simple" sourceAttributeID="uid"> <resolver:Dependency ref="myLDAP" /> </resolver:AttributeDefinition> |
<!-- Release to anyone --> <afp:AttributeFilterPolicy id="PolicyforAnyone"> <afp:PolicyRequirementRule xsi:type="basic:ANY" /> <afp:AttributeRule attributeID="%{idp.persistentId.sourceAttribute}"> <afp:PermitValueRule xsi:type="basic:ANY" /> </afp:AttributeRule> </afp:AttributeFilterPolicy> |
T.B.D.