Note
OpenID Connect is a protocol based on REST, OAuth 2.0 and JOSE stacks. It is described here: http://openid.net/connect/.
LL::NG can act as an OpenID Connect Provider (OP). It will answer to OpenID Connect requests to give user identity (through ID Token) and information (through User Info end point).
As an OP, LL::NG supports a lot of OpenID Connect features:
See OpenID Connect service configuration chapter.
Go in General Parameters » Issuer modules » OpenID Connect and configure:
Tip
For example, to allow only users with a strong authentication level:
$authenticationLevel > 2
Each Relying Party has its own configuration way. LL::NG publish its OpenID Connect metadata to ease the configuration of client.
The metadata can be found at the standard “Well Known” URL: http://auth.example.com/.well-known/openid-configuration
An example of its content:
{
"end_session_endpoint" : "http://auth.example.com/oauth2/logout",
"jwks_uri" : "http://auth.example.com/oauth2/jwks",
"token_endpoint_auth_methods_supported" : [
"client_secret_post",
"client_secret_basic"
],
"token_endpoint" : "http://auth.example.com/oauth2/token",
"response_types_supported" : [
"code",
"id_token",
"id_token token",
"code id_token",
"code token",
"code id_token token"
],
"userinfo_signing_alg_values_supported" : [
"none",
"HS256",
"HS384",
"HS512",
"RS256",
"RS384",
"RS512"
],
"id_token_signing_alg_values_supported" : [
"none",
"HS256",
"HS384",
"HS512",
"RS256",
"RS384",
"RS512"
],
"userinfo_endpoint" : "http://auth.example.com/oauth2/userinfo",
"request_uri_parameter_supported" : "true",
"acr_values_supported" : [
"loa-4",
"loa-1",
"loa-3",
"loa-5",
"loa-2"
],
"request_parameter_supported" : "true",
"subject_types_supported" : [
"public"
],
"issuer" : "http://auth.example.com/",
"grant_types_supported" : [
"authorization_code",
"implicit",
"hybrid"
],
"authorization_endpoint" : "http://auth.example.com/oauth2/authorize",
"scopes_supported" : [
"openid",
"profile",
"email",
"address",
"phone"
],
"require_request_uri_registration" : "false",
"registration_endpoint" : "http://auth.example.com/oauth2/register"
}
Go in Manager and click on OpenID Connect Relying Parties, then click on Add OpenID Relying Party. Give a technical label (no spaces, no special characters), like “sample-rp”;
You can then access to the configuration of this RP.
You can map here the attribute names from the LL::NG session to an OpenID Connect claim.
Claim name | Associated scope | Type | Example of corresponding LDAP attribute |
---|---|---|---|
sub | openid | string | uid |
name | profile | string | cn |
given_name | profile | string | givenName |
family_name | profile | string | sn |
middle_name | profile | string | |
nickname | profile | string | |
preferred_username | profile | string | displayName |
profile | profile | string | labeledURI |
picture | profile | string | |
website | profile | string | |
string | |||
email_verified | boolean | ||
gender | profile | string | |
birthdate | profile | string | |
zoneinfo | profile | string | |
locale | profile | string | preferredLanguage |
phone_number | phone | string | telephoneNumber |
phone_number_verified | phone | boolean | |
updated_at | profile | string | |
formatted | address | string | registeredAddress |
street_address | address | string | street |
locality | address | string | l |
region | address | string | st |
postal_code | address | string | postalCode |
country | address | string | co |
For each OpenID Connect claim you want to release to applications, you can define:
Attention
The specific sub attribute is not defined here, but in User attribute parameter (see below).
Attention
By default, only claims that are part of standard OpenID Connect scopes will be sent to a client. If you want to send a claim that is not in the OpenID Connect specification, you need to declare it in the Extra Claims section
If you want to make custom claims visible to OpenID Connect clients, you need to declare them in a scope.
Add your additional scope as the Key, and a space-separated list of claims as the Value:
In this example, an OpenID Client asking for the timelord scope will be able to read the rebirth_count and bloodline claims from the Userinfo endpoint.
Danger
Any Claim defined in this section must be mapped to a LemonLDAP::NG session attribute in the Exported Attributes section
New in version 2.0.12.
This feature may change in a future version in a way that breaks
compatibility with existing configuration
By default, LemonLDAP::NG grants all scopes requested by the application, as long as the user consents to them.
This configuration screen allows you to change that behavior by attaching a rule to a particular scope.
When writing scope rules, you can use the special $requested variable. This variables evaluates to true within a scope rule when the corresponding scope has been requested by the application. You can use this variable in a dynamic rule when you only want to add a scope when the application requested it.
Examples:
Basic
Advanced
Timeouts
Security
Logout
- Allowed redirection addresses for logout: A space separated list of URLs that this client can redirect the user to once the logout is done (through post_logout_redirect_uri)
- URL: Specify the relying party’s logout URL
- Type: Type of Logout to perform (only Front-Channel is implemented for now)
- Session required: Whether to send the Session ID in the logout request
The Resource Owner Password Credentials Grant allows you to exchange a user’s login and password for an access token. This must be considered a legacy form of authentication, since the Authorization Code web-based flow is prefered for all applications that support it. It can however be useful in some scenarios involving technical accounts that cannot implement a web-based authentication flow.
Changed in version 2.0.12.
The Client Credentials Grant allows you to obtain an Access Token using only a Relying Party’s Client ID and Client Secret.
The following attributes are made available in the created session:
The Access Rule, if defined, will have access to those variables, as well as the @ENV array. You can use it to restrict the use of this grant to pre-determined scopes, a particular IP address, etc.
These session attribute will be released on the UserInfo endpoint if they are mapped to Exported Attributes and Extra Claims
You can define here macros that will be only evaluated for this service, and not registered in the session of the user.