Instruction on how to configure OpenID Connect authentication.
When creating a new Yoda instance, setup the variables in the group_vars as explained in Configuring Yoda and run the playbook. Alternatively, you can choose to pass the variables with the –extra-vars option every time when running the Ansible playbook. The development group_vars contains examples for all of the variables.
For OIDC to function properly it requires the following variables to be set:
- oidc_active (default:
false), used by Ansible during setup. Please note that switching
false(and running the Ansible playbook again) is not a safe way to disable OIDC: you should also replace the
oidc_client_secretvalues with placeholders.
- oidc_jwks_uri, which returns all the valid JSON Web Key sets
- oidc_jwt_issuer, the
issvalue in the JWT token
Additionally, depending on the authorization server, you may need to configure the following variables:
- oidc_scopes (default:
- oidc_email_field (default:
- oidc_login_hint (default:
Finally, for customization purposes, you can also configure:
- oidc_domains, which should be an array of domains with OIDC authentication, e.g.
["mydomain.com","myotherdomain.com","*.allsubdomains.com"]. By default, OIDC authentication is enabled for every domain (provided that oidc_active is set to
- oidc_signin_text (deprecated since v1.8)
For token verification there are also the following parameters which define what checks are done when verifying a JWT. Take caution when setting values to
false, as this makes verification less strict. Details can be found in the group_vars file.
- oidc_req_exp (default:
- oidc_req_iat (default:
- oidc_req_nbf (default:
- oidc_verify_aud (default:
- oidc_verify_iat (default:
- oidc_verify_exp (default:
- oidc_verify_iss (default:
If your identity provider is in a different domain than the Yoda portal, you need to set
To verify whether the deployment/update went successfully, go to the Yoda portal and click the Sign in button, enter an email address and click Next.
If configured correctly, you should now see an extra button with the text as configured with the
oidc_signin_text variable (default: Sign in with OIDC).
When clicking on the Sign in with OIDC button, login at the configured authorized server and verify that you are returned to the Yoda portal homepage. If so, you have correctly configured authentication via OIDC. Please also verify that the standard login method is still working as intended.
Alternatively, if you have configured the
oidc_domains parameter, entering an email address with the configured domain and clicking Next should redirect you automatically to the configured authorization server.
Follow the above steps as if having clicked the Sign in with OIDC button
- The Sign in with OIDC button is missing: check if the
oidc_activevariable is set to
truein you group_vars and run the Ansible playbook again.
- After signing in at the authorization server I am redirected to the login screen with the error 'Failed to login to Yoda. Please contact a data manager about your account.': This can have multiple causes:
- The user that is trying to sign in does not exist, or
- An error occurred after signing in at the authorization server.
To check whether the problem is caused by case 1, verify that the user exists in Yoda and add them if they are not. To solve case 2, re-check the client secret, the token URI, the email field, the public key, and scopes variables.