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

123 lines
3.6 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
Endpoints
2020-05-14 23:29:41 +02:00
~~~~~~~~~~
Name of different OpenID Connect endpoints. You can keep the default
values unless you have a specific need to change them.
- **Authorization**
- **Tokens**
2020-05-14 23:29:41 +02:00
- **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.
- **Authorization Code flow**: Set to 1 to allow Authorization Code flow
- **Implicit flow**: Set to 1 to allow Implicit flow
- **Hybrid flow**: Set to 1 to allow Hybrid flow
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)
Timeouts
~~~~~~~~
2022-02-11 18:41:11 +01:00
- **Authorization Codes**: Expiration time of
authorization code. Default value is one minute.
- **ID Tokens**: Expiration time of ID Tokens.
Default value is one hour.
- **Access Tokens**: Expiration time of Access Tokens.
Default value is one hour.
- **Offline sessions**: This option sets Refresh Tokens lifetime
retrieved with ``offline_access`` scope. Default value is one month.
2022-02-12 22:18:26 +01:00
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
sessions, else they will be stored in main sessions storage.
2020-05-14 23:29:41 +02:00
Dynamic Registration
~~~~~~~~~~~~~~~~~~~~
- **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 restrict
this by protecting the WebServer registration endpoint with
an authentication module, and give the credentials to clients.
2020-05-14 23:29:41 +02:00
If dynamic registration is enabled, you can configure the following
options to define attributes and extra claims released when a new relying
party is registered through ``/oauth2/register`` endpoint:
2020-05-14 23:29:41 +02:00
- **Exported vars**
- **Extra claims**
2020-05-14 23:29:41 +02:00
Keys rotation script
--------------------
2020-05-14 23:29:41 +02:00
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``).