Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Added documentation for OIDC claims option including ACR values

Markus Kahl8688e3a34d74
diff --git a/docs/installation-and-operations/misc/custom-openid-connect-providers/README.md b/docs/installation-and-operations/misc/custom-openid-connect-providers/README.md
index beac5dd8992..35af15977ca 100644
--- a/docs/installation-and-operations/misc/custom-openid-connect-providers/README.md
+++ b/docs/installation-and-operations/misc/custom-openid-connect-providers/README.md
@@ -36,7 +36,6 @@ options = {
```
Just type this into the console and confirm by pressing *Enter*.
-You can see a full list of possible options [here](https://github.com/m0n9oose/omniauth_openid_connect#options-overview).
This assumes that you have configured your application in the respective provider correctly
including the **redirect URL** which will be the following:
@@ -64,3 +63,60 @@ Once this is done you will see an "Okta" button in the bottom area of the login
Clicking on it will start the login process.
_**Note**: This is an Enterprise Edition feature. If you do not see the button you will have to activate the Enterprise Edition first._
+
+## More options
+
+You can see a list of possible options [here](https://github.com/m0n9oose/omniauth_openid_connect#options-overview).
+
+### Claims
+
+You can also request [claims](https://openid.net/specs/openid-connect-core-1_0-final.html#Claims) for both the id_token and userinfo endpoint.
+Mind though that currently only claims requested for the id_token returned with the authorize response are validated.
+That is authentication will fail if a requested essential claim is not returned.
+
+#### Requesting MFA authentication via the ACR claim
+
+Say for example that you want to request that the user authenticate using MFA (multi-factor authentication).
+You can do this by using the ACR (Authentication Context Class Reference) claim.
+
+This may look different for each identity provider. But if they follow, for instance the [EAP (Extended Authentication Profile)](https://openid.net/specs/openid-connect-eap-acr-values-1_0.html) then the claims would be `phr` (phishing-resistant) and 'phrh' (phishing-resistant hardware-protected). Others may simply have an additional claim called `Multi_Factor`.
+
+You have to check with your identity provider how these values must be called.
+
+In the following example we request a list of ACR values. One of which must be satisfied
+(i.e. returned in the ID token by the identity provider, meaning that the requested authentication mechanism was used)
+for the login in OpenProject to succeed. If none of the requested claims are present, authentication will fail.
+
+```ruby
+options = { ... }
+
+options["claims"] = {
+ "id_token": {
+ "acr": {
+ "essential": true,
+ "values": ["phr", "phrh", "Multi_Factor"]
+ }
+ }
+}
+```
+
+#### Non-essential claims
+
+You may also request non-essential claims. In the example above this indicates that users should preferrably be authenticated using
+those mechanisms but it's not strictly required. The login into OpenProject will then work even if none of the claims
+are returned by the identity provider.
+
+**The acr_values option**
+
+For non-essential ACR claims you can also use the shorthand form of the option like this:
+
+```ruby
+options = { ... }
+
+options["acr_values"] = "phr phrh Multi_Factor"
+```
+
+The option takes a space-separated list of ACR values. This is functionally the same as using the
+more complicated `claims` option above but with `"essential": false`.
+
+For all other claims there is no such shorthand.