SAML 通信は、ID プロバイダとサービス・プロバイダの間で要求および応答パケットを介して行われる。 レスポンスパケット内でユーザーデータを提供する方法について取り上げます。 設定は、 portal-ext.properties
で行います。
対象製品
Liferay Portal 6.1 EE GA2/GA3 および 6.2 EE 用の SAML 2.0 への Liferay Connector。
解像度
1. 2つのLiferayポータルを設定し、一方をIdP、もう一方をSPとします。
IdP は http://alpha.test.com:8080 with entityId liferaysamlidpdemo
で動作し、SP は http://www.able.com:9080 with entityId liferaysamlspdemo
で動作します。
2. IdPを設定する( portal-ext.properties
の中)。
saml.enabled=true saml.role=idp saml.entity.id=liferaysamlidpdemo saml.require.ssl=false saml.sign.metadata=true saml.idp.authn.request.signature.required=true saml.keystore.path=${liferay.home}/data/keystore.jks saml.keystore.password=liferay saml.keystore.type=jks saml.keystore.credential.password[liferaysamlidpdemo]=liferay saml.metadata.paths=http://www.able.com:9080/c/portal/saml/metadata saml.idp.metadata.attributes.enabled[liferaysamlspdemo]=true saml.idp.metadata.attribute.names[liferaysamlspdemo]=emailAddress,screenName,firstName,lastName,expando:myCustomAttribute
3. SP を設定する( portal-ext.properties
の中)。 myCustomAttributeのexpando属性の値が、ユーザーのlastNameになっていることに注目してください。
saml.enabled=true saml.role=sp saml.entity.id=liferaysamlspdemo saml.require.ssl=false saml.sign.metadata=true saml.keystore.path=${liferay.home}/data/keystore.jks saml.keystore.password=liferay saml.keystore.type=jks saml.keystore.credential.password[liferaysamlspdemo]=liferay saml.metadata.paths=http://alpha.test.com:8080/c/portal/saml/metadata saml.sp.default.idp.entity.id=liferaysamlidpdemo saml.sp.user.attribute.mappings=screenName=screenName\nemailAddress=emailAddress\nfirstName=firstName\nmyCustomAttribute=lastName