- Go to $PLATFORM_HOME than run this command to install exo-saml2 addon
./addon install exo-saml
- Add the following properties to $PLATFORM_HOME/gatein/conf/exo.properties
gatein.sso.enabled=true
gatein.sso.saml.sp.enabled=true
gatein.sso.callback.enabled=true
gatein.sso.valve.enabled=true
gatein.sso.valve.class=org.gatein.sso.saml.plugin.valve.ServiceProviderAuthenticator
gatein.sso.filter.login.sso.url=/portal/dologin
gatein.sso.filter.initiatelogin.enabled=false
gatein.sso.filter.logout.enabled=true
gatein.sso.filter.logout.class=org.gatein.sso.saml.plugin.filter.SAML2LogoutFilter
gatein.sso.filter.logout.url=${gatein.sso.sp.url}?GLO=true
# Custom properties
gatein.sso.sp.host=SP_HOSTNAME
gatein.sso.sp.url=${gatein.sso.sp.host}/portal/dologin
gatein.sso.idp.host=IDP_HOSTNAME
gatein.sso.idp.url=IDP_SAML_ENDPOINT
gatein.sso.idp.url.logout=IDP_SAML_ENDPOINT_LOGOUT
gatein.sso.idp.alias=IDP_SIGNING_ALIAS
gatein.sso.idp.signingkeypass=IDP_SIGNING_KEY_PASS
gatein.sso.idp.keystorepass=IDP_KEYSTORE_PASS
# WARNING: This bundled keystore is only for testing purposes. You should generate and use your own keystore!
gatein.sso.picketlink.keystore=${exo.conf.dir}/saml2/jbid_test_keystore.jks
Note: The following properties values must be configured
IDP_SAML_ENDPOINT: Saml IDP Endpoint: Example, http://idp.com/saml
IDP_SAML_ENDPOINT_LOGOUT: Saml IDP Logout Endpoint: Example, http://idp.com/saml/logout
IDP_SIGNING_ALIAS: Certificate Alias in selected Keystore file, Example: idpalias
IDP_SIGNING_KEY_PASS: Certificates Keystore Password, Example: test123
IDP_KEYSTORE_PASS: SSL Keystore Password, Example: store123
- Start eXo Platform with
cd $PLATFORM_HOME
./start_eXo.sh
- If you configured Salesforce as SAML2 SP as above section, you will have to disable it.
- Enable Identity Provider by go to
Setup
→Security Controls
→Identity Provider
, then clickEnable Identity Provider
. Accept the default certificate by clicking Save. You can change it later if you need. - Create
Connected Apps
- Click the link in the
Service Providers
section - Fill in all required information. In the
Web App Settings
section, checkEnable SAML
and complete the following information- Entity ID: The SP login URL, like
http://www.sp.com:8080/portal/dologin
- ACS URL: The URL of the Assertion Consumer Service. In this scenario, it is
http://www.sp.com:8080/portal/dologin
too - Subject Type: Select
Federation ID
- Name ID Format: Select
urn:oasis:names:tc:SAML:2.0:nameid-format:transient
- Issuer: Use your domain like
https://exodoc-dev-ed.my.salesforce.com
- Entity ID: The SP login URL, like
- Click the link in the
- Make sure your connected application can be accessed by users who have the "Standard Platform User" profile
- Configure Platform follow the
Install and configure eXo Platform as Service provider (SP)
section above - Update these configuration:
gatein.sso.idp.host=exodoc-dev-ed.my.salesforce.com
gatein.sso.idp.url=https://exodoc-dev-ed.my.salesforce.com/idp/endpoint/HttpPost
gatein.sso.sp.url=http://www.sp.com:8080/portal/dologin
- Download and import Salesforce IDP certificate to your keystore. The Salesforce IDP certificate is downloaded from the
Identity Provider
page Then import this certificate to your keystore with command like this:
keytool -import -keystore secure-keystore.jks -file SelfSignedCert_17Oct2013_070921.crt -alias salesforce-idp
SelfSignedCert_17Oct2013_070921.crt
is downloaded file.
In case you are using jbid_test_keystore.jks
the command will be (the store password is store123
):
keytool -import -keystore jbid_test_keystore.jks -file SelfSignedCert_17Oct2013_070921.crt -alias salesforce-idp
- Modify
$PLATFORM_SP_HOME/gatein/conf/exo.properties
and update value ofgatein.sso.idp.alias
property
gatein.sso.idp.alias=idpalias
- Start eXo Platform as SP then test it
When using saml2-addon, exo needs the user identifier in the name-id field of the assertion.
To configure it, there is 2 options :
- On IDP side : some IDPs allows to force the name-id format neverming the name-id requested in the SAMLRequest assertion. In this case, you can configure
- persistent : the nameid will be a unique identifier, which will not change during this. This id must be the username in eXo
- unspecified : then you can choose a user attribute like username as name id
- On exo side : the property
gatein.sso.saml.nameid.format
allow to configure the wanted nameid format. By dafault, value isurn:oasis:names:tc:SAML:2.0:nameid-format:persistent
. It can be changed tourn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
if needed
gatein.sso.saml.nameid.format