# cidaas as IDP for OIDC-SSO
To set up the IDP you need a running instance of cidaas.
# Preamble
The Enterprise Edition (EE) server and client support the OIDC protocol that allows you to configure an external service as IDP (identity provider) for SSO (single sign on). This guide here will explain how to configure cidaas (opens new window) as OIDC-IDP for SSO. We assume that:
- your cidaas instance is running on https://cidaas.test.de
- your webclient can be accessed on https://psono.test.de
- the server is reachable at https://psono.test.de/server (e.g. https://psono.test.de/server/info/ shows you some nice json output).
This is your first OIDC provider that you want to configure (therefore we give it the ID "1").
TIP
This feature is only available in the Enterprise Edition.
# cidaas
Create a new app
Configure app
Configure the scopes and redirect urls as shown below.
# Server (settings.yaml)
After setting up the IDP for the OIDC-Authentication it is time to configure your running Psono server to act as the SP. It is required that Psono can reach cidaas and vise versa.
Edit the settings.yml like so:
# Make sure the 'OIDC'-entry is present in the following list
AUTHENTICATION_METHODS: ['OIDC']
OIDC_CONFIGURATIONS:
1:
OIDC_RP_SIGN_ALGO: 'RS256'
OIDC_RP_CLIENT_ID: 'XXXX'
OIDC_RP_CLIENT_SECRET: 'XXXX'
OIDC_OP_JWKS_ENDPOINT: 'https://test.cidaas.de/.well-known/jwks.json'
OIDC_OP_AUTHORIZATION_ENDPOINT: 'https://test.cidaas.de/authz-srv/authz'
OIDC_OP_TOKEN_ENDPOINT: 'https://test.cidaas.de/token-srv/token'
OIDC_OP_USER_ENDPOINT: 'https://test.cidaas.de/users-srv/userinfo'
OIDC_USERNAME_ATTRIBUTE: 'email'
OIDC_GROUPS_ATTRIBUTE_DICT_GROUP_ID: 'groupId'
AUTOPROVISION_PSONO_GROUP: False
FORCE_MEMBERSHIP_OF_AUTOPROVISIONED_GROUPS: False
AUTOPROVISION_PSONO_FOLDER: False
- The cidaas endpoints can be found on the ".well-known"-page (e.g. https://cidaas.test.de/.well-known/openid-configuration) of your installation
- Change
AUTOPROVISION_PSONO_GROUP
parameter and set it to true, if you want that Psono automatically creates a corresponding Psono group for any new OIDC group and an appropriate group mapping. - Change
AUTOPROVISION_PSONO_FOLDER
parameter and set it to true, if you want that Psono automatically creates a folder with the same name as the group and shares it with the automatically created Psono Group. (RequiresAUTOPROVISION_PSONO_GROUP
to be set to true to have any effect.) - Change
FORCE_MEMBERSHIP_OF_AUTOPROVISIONED_GROUPS
parameter and set it to true, if you want that Psono automatically checks "forced membership" for every automatically created Psono Group. (RequiresAUTOPROVISION_PSONO_GROUP
to be set to true to have any effect.)
TIP
Always restart the server after making changes in the setting.yml
-file.
# Client (config.json)
Now you have to configure your client, so your users can use this configured IDP.
Basic
Update your config.json similar to the one shown below.
{ ... "authentication_methods": ["OIDC"], "oidc_provider": [{ "title": "OIDC Login", "provider_id": 1, "button_name": "Login " }] ... }
The variable authentication_methods restricts the allowed login methods. In the example above only OIDC will be allowed and the normal login "hidden". The title and button_name can be adjusted however you like. The
provider_id
needs to match the one that you used on your server.(optional) Automatic login
You may want to "automatically" click on the login button to initiate the login flow. You can accomplish this by modifying the config.json as shown below:
{ ... "authentication_methods": ["OIDC"], "auto_login": true, ... }
WARNING
This will only work if you have just one provider configured with only one authentication method. Users won't be able to modify the server url nor choose to register or interact with the login form in any other way.