...
eduPersonTargetedIDのAttributeDefinitionはデフォルトのままで利用可能です。
コード ブロック <!-- Attribute Definition for eduPersonTargetedID --> <resolver:AttributeDefinition id="eduPersonTargetedID" xsi:type="SAML2NameID" xmlns="urn:mace:shibboleth:2.0:resolver:ad" nameIdFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" sourceAttributeID="computedID"> <resolver:Dependency ref="computedID" /> <resolver:AttributeEncoder xsi:type="SAML1XMLObject" xmlns="urn:mace:shibboleth:2.0:attribute:encoder" name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10" /> <resolver:AttributeEncoder xsi:type="SAML2XMLObject" xmlns="urn:mace:shibboleth:2.0:attribute:encoder" name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10" friendlyName="eduPersonTargetedID" /> </resolver:AttributeDefinition>
Template Attribute Definitionで uid-createTimestamp の文字列を返すAttributeDefinitionを定義して、ComputedID用DataConnectorの sourceAttributeID, Dependencyを変更します。ここでは「templateePTID」という名前を用います。
コード ブロック <!-- Computed targeted ID connector --> <resolver:DataConnector xsi:type="ComputedId" xmlns="urn:mace:shibboleth:2.0:resolver:dc" id="computedID" generatedAttributeID="computedID" - sourceAttributeID="uid" + sourceAttributeID="templateePTID" salt="*****YOUR_SALT*****"> - <resolver:Dependency ref="myLDAP" /> + <resolver:Dependency ref="templateePTID" /> </resolver:DataConnector> + <resolver:AttributeDefinition id="templateePTID" xsi:type="Template" xmlns="urn:mace:shibboleth:2.0:resolver:ad"> + <resolver:Dependency ref="myLDAP" /> + + <Template> + <![CDATA[ + ${uid}-${createTimestamp} + ]]> + </Template> + + <SourceAttribute>uid</SourceAttribute> + <SourceAttribute>createTimestamp</SourceAttribute> + </resolver:AttributeDefinition>
LDAPからcreateTimestampを取得するためにReturnAttributesを定義します。
コード ブロック <resolver:DataConnector id="myLDAP" xsi:type="dc:LDAPDirectory" ldapURL="ldap://localhost" baseDN="o=Test Organization,dc=ac,c=JP" principal="cn=olmgr,o=Test Organization,dc=ac,c=JP" principalCredential="**** YOUR LDAP Password ****"> <dc:FilterTemplate> <![CDATA[ (uid=$requestContext.principalName) ]]> </dc:FilterTemplate> + <dc:ReturnAttributes>* createTimestamp</dc:ReturnAttributes> </resolver:DataConnector>
Async SLO(Asynchronous Single Logout)の設定方法
ShibbolethにおけるAsync SLOの設定方法を記載します。
前提
IdP/SPはそれぞれ以下のバージョンであることを前提とします。
- IdP: 2.4.0
- SP : 2.5.3
IdPの設定
メタデータへ<SingleLogoutService>を追加
IdP のメタデータに<IdPSSODescriptor>の子要素として<SingleLogoutService>を追加します。 Locationのホスト名部分(idp.example.ac.jp)は適宜読み替えて下さい。IdPが特殊な設定でなければ、ホスト名部分のみ合わせ れば問題ありません。
コード ブロック | ||||
---|---|---|---|---|
| ||||
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://idp.example.ac.jp/idp/profile/SAML2/Redirect/SLO" />
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://idp.example.ac.jp/idp/profile/SAML2/POST/SLO" />
<SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://idp.example.ac.jp:8443/idp/profile/SAML2/SOAP/SLO" /> |
不足している設定の確認
IdPで2.4.0より前のバージョンで使用していた設定を引き継いでいる場合、設定が不足している場合があります。不足している設定があった場合は追加してくだい。
relying-parth.xml
<DefaultRelyingParty>要素に以下が設定されていることコード ブロック xml xml <ProfileHandler xsi:type="SAML2SLO" inboundBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" outboundBindingEnumeration="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"> <RequestPath>/SAML2/Redirect/SLO</RequestPath> </ProfileHandler> <ProfileHandler xsi:type="SAML2SLO" inboundBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" outboundBindingEnumeration="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"> <RequestPath>/SAML2/POST/SLO</RequestPath> </ProfileHandler> <ProfileHandler xsi:type="SAML2SLO" inboundBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" outboundBindingEnumeration="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"> <RequestPath>/SAML2/POST-SimpleSign/SLO</RequestPath>
SPの設定
shibboleth2.xmlのSession要素内に以下が設定されている必要がありますが、デフォルトで設定されていますので、特に追加設定は不要です。
コード ブロック | ||
---|---|---|
| ||
<Logout>SAML2 Local</Logout> |
上記設定により、IdPのメタデータに<SingleLogoutService>が定義されている場合には、ログアウト処理でSPのセッションを削除し、IdPのログアウトページへ移動します。 この時、IdP側のセッションも削除されます。定義されていない場合は、ローカルログアウトになり、SPのセッションだけ削除されます。
SP関連情報
Embedded DS
特定の言語で表示する方法
...