lemonldap-ng/doc/sources/admin/openidconnectservice.rst

125 lines
3.7 KiB
ReStructuredText
Raw Normal View History

2020-05-14 23:29:41 +02:00
OpenID Connect service configuration
====================================
Service configuration
---------------------
Go in Manager and click on ``OpenID Connect Service`` node.
Issuer identifier
~~~~~~~~~~~~~~~~~
Set the issuer identifier, which should be the portal URL.
For example: http://auth.example.com
End points
~~~~~~~~~~
Name of different OpenID Connect endpoints. You can keep the default
values unless you have a specific need to change them.
- **Authorization**
- **Token**
- **User Info**
- **JWKS**
- **Registration**
- **End of session**
- **Check Session**
2020-05-18 09:56:39 +02:00
.. tip::
2020-05-14 23:29:41 +02:00
The end points are published inside JSON metadata.
Authentication context
~~~~~~~~~~~~~~~~~~~~~~
2022-02-17 22:37:04 +01:00
You can associate here an authentication context to an authentication level.
2020-05-14 23:29:41 +02:00
Security
~~~~~~~~
2022-02-18 19:09:41 +01:00
- **Keys**: Define public/private key pair for asymmetric signature. A JWKS
``kid`` (Key ID) is automatically derived when new keys are generated.
2020-05-14 23:29:41 +02:00
- **Dynamic Registration**: Set to 1 to allow clients to register
themselves. This may be a security risk as this will create a new
configuration in the backend per registration request. You can limit
2022-02-18 19:09:41 +01:00
this by protecting in the WebServer the registration endpoint with
2020-05-14 23:29:41 +02:00
an authentication module, and give the credentials to clients.
2022-02-18 19:09:41 +01:00
- **Only allow declared scopes**: By default, LL::NG will grant all requested scopes.
When this option is enabled, LL::NG will only grant:
2021-06-03 18:40:36 +02:00
- Standard OIDC scopes (``openid`` ``profile`` ``email`` ``address`` ``phone``)
- Scopes declared in :ref:`Scope values content <oidcextraclaims>`
2021-06-03 18:40:36 +02:00
- Scopes declared in :ref:`Scope Rules <oidcscoperules>` (if they match the rule)
2022-02-18 19:09:41 +01:00
- **Authorization Code flow**: Set to 1 to allow Authorization Code flow
2020-05-14 23:29:41 +02:00
- **Implicit flow**: Set to 1 to allow Implicit flow
- **Hybrid flow**: Set to 1 to allow Hybrid flow
2022-02-11 18:41:11 +01:00
2022-02-12 22:18:26 +01:00
2022-02-11 18:41:11 +01:00
Timeout
~~~~~~~
- **Authorization Code expiration**: Expiration time of
2022-02-12 22:18:26 +01:00
authorization code. The default value is one minute.
2022-02-11 18:41:11 +01:00
- **ID Token expiration**: Expiration time of ID Tokens. The default
2022-02-12 22:18:26 +01:00
value is one hour.
2022-02-18 19:09:41 +01:00
- **Access Token expiration**: Expiration time of Access Tokens.
The default value is one hour.
2022-02-11 18:41:11 +01:00
- **Offline session expiration**: This sets the lifetime of the
2022-02-12 22:18:26 +01:00
refresh token obtained with the ``offline_access`` scope. The
default value is one month.
2020-05-14 23:29:41 +02:00
Sessions
~~~~~~~~
2022-02-18 19:09:41 +01:00
Best pratice is to use a separate sessions storage for OpenID Connect
2020-05-14 23:29:41 +02:00
sessions, else they will stored in the main sessions storage.
Dynamic Registration
~~~~~~~~~~~~~~~~~~~~
If dynamic registration is enabled, you can configure the following
options to define attributes and extra claims when a new relying party
is registered through the ``/oauth2/register`` endpoint:
2020-05-14 23:29:41 +02:00
- Exported vars for dynamic registration
- Extra claims for dynamic registration
Key rotation script
-------------------
2022-02-17 22:37:04 +01:00
OpenID Connect specifications allow to rotate keys to improve security.
LL::NG provides a script to do this, that should be used in a cronjob.
2020-05-14 23:29:41 +02:00
The script is ``/usr/share/lemonldap-ng/bin/rotateOidcKeys``. It can be
run for example each week:
::
5 5 * * 6 www-data /usr/share/lemonldap-ng/bin/rotateOidcKeys
2020-05-18 09:56:39 +02:00
.. tip::
2020-05-14 23:29:41 +02:00
2022-02-18 19:09:41 +01:00
Set the correct WebServer user, else generated configuration will
2020-05-14 23:29:41 +02:00
not be readable by LL::NG.
Session management
------------------
LL::NG implements the `OpenID Connect Change Notification specification <http://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification>`__
2020-05-14 23:29:41 +02:00
A ``changed`` state will be sent if the user is disconnected from LL::NG
2022-02-12 22:18:26 +01:00
portal (or has removed its SSO cookie). Else the ``unchanged`` state
2020-05-14 23:29:41 +02:00
will be returned.
2020-05-18 09:56:39 +02:00
.. tip::
2020-05-14 23:29:41 +02:00
2022-02-12 22:18:26 +01:00
This feature requires that the LL::NG cookie is exposed to
javascript (``httpOnly`` option must be set to ``0``).