This module supports OpenID connect flow to authenticate with CERN SSO and CERN egroup authorisation. It protects the static content (REST API calls and WebSocket messages are protected by JWT token). It defines how to handle service accounts.
new OpenId({secret: SECRET, id: ID, redirect_uri: REDIRECT_URI, well_known: WELL_KNOWN[, timeout: TIMEOUT, sa_whitelist: SA_WHITELIST, sa_role: SA_ROLE]});
Where:
SECRET
- Application secretID
- Application IDREDIRECT_URI
- Authentication callbackWELL_KNOWN
- So-called "well-known" endpoint defining OpenID configuration- [
TIMEOUT
] - OpenID timeout in milliseconds - [
SA_WHITELIST
] - IP address range to accept service accounts from - [
SA_ROLE
] - OpenID role that service account needs to access
openId: {
secret: '<secret>',
id: '<id>',
redirect_uri: 'https://myapp.cern.ch/callback',
well_known: 'https://auth.cern.ch/auth/realms/cern/.well-known/openid-configuration'
}
- Go to https://application-portal.web.cern.ch
- Register your application
- Add "SSO Registration"
- Select "OpenID Connect (OIDC)"
- Set "Redirect URI": eg.
https://myapp.cern.ch/callback
- Submit (do not check any boxes)
- Go to https://application-portal.web.cern.ch
- Edit your application
- "Add role"
- Provide: "Role Name", "Role Identifier", "Description"
- Check "This role is required to access my application"
- Set Minimum Level Of Assurance to most right ("CERN") and submit
- Click on green ("Add group to role") icon
- Add
alice-member
group to "Linked Groups"
- Go to https://application-portal.web.cern.ch
- Edit your application
- "Add role"
- Provide: "Role Name" and "Description", set "Role Identifier" as
admin
or any other role supported by your application - Set Minimum Level Of Assurance to most right ("CERN") and submit
- Click on green ("Add group to role") icon
- Select e-group to be granted with GUI admin or special access and add it to "Linked Groups"
- On the frontend, list of roles is available in Session service
Additional details are available in here: https://auth.docs.cern.ch/user-documentation/oidc/config/