| Name | Description | Required | Type |
|---|---|---|---|
|
Deprecated. This configuration now resides inside th token of your choosing. |
false |
String |
|
Deprecated. This configuration now resides inside th token of your choosing. |
false |
String |
|
Deprecated. This configuration now resides inside th token of your choosing. |
false |
String |
|
Deprecated. This configuration now resides inside th token of your choosing. |
false |
String |
|
Deprecated. This configuration now resides inside th token of your choosing. |
false |
String |
|
Deprecated. This configuration now resides inside th token of your choosing. |
false |
String |
|
Deprecated. This configuration now resides inside th token of your choosing. |
false |
String |
|
Deprecated. This configuration now resides inside th token of your choosing. |
false |
String |
OIDC client auth for REST
This page describes how to configure midPoint to use an OIDC authentication provider for REST API authentication.
This configuration consists of the following parts, both of which take place in the Security Policy configuration:
Create an OIDC module
The OIDC module is configured as oidc in the modules section of the authentication configuration.
The elements of the oidc module configuration are described in the following table.
| Name | Description | Required | Type |
|---|---|---|---|
|
Unique identifier among This identifier will be used to reference this module. |
true |
String |
|
Contains configuration of the OIDC resource server |
false |
Complex resourceServer type |
|
Type of object this authentication module applies to, such as Default value is |
false |
QNames |
|
Unique name of the authentication module Deprecated, use |
false |
String |
Configuration details of the individual elements listed in the table above are described in the following sections.
See an example module configuration below.
While resourceServer is not mandatory as per specification, in order to successfully configure OIDC REST authentication, it is necessary to use it.
|
Available fields in resourceServer section
While neither of jwt or opaqueToken is mandatory, at least one of them must be present. If both are present, the jwt configuration will be used.
|
| Name | Description | Required | Type |
|---|---|---|---|
|
Defines that resource server expects token in JWT format. |
false |
Complex jwt type. Described in Token configuration 1 |
|
Defines that resource server expects token in opaque format. |
false |
Complex opaqueToken type. Described in Token configuration 1 |
Deprecated fields in resourceServer section
Token configuration 1
This table contains methods to obtain public key. They are all mutually exclusive and evaluated in the order they are listed:
-
trustingAsymmetricCertificate -
keyStoreTrustingAsymmetricKey -
singleSymmetricKey -
jwkSetUri -
issuerUri
In this table, the mandatory field is omitted, because all of the listed options are not mandatory.
| Name | Description | JWT-relevant | Opaque-relevant | Type |
|---|---|---|---|---|
|
Realm name midPoint will use in WWW-Authenticate header. |
true |
true |
String |
|
URI for the OIDC authentication provider. Relies on the |
true |
true |
String |
|
Name of the attribute, included in the token, referring to the subject of authentication, such as Default value is |
true |
true |
String |
|
Uri for the JSON Web Key (JWK) Set endpoint. |
true |
false |
String |
|
OIDC provider’s public key |
true |
false |
ProtectedStringType |
|
It specifies the cryptographic algorithm used by the OIDC provider for digital signatures. Potential values are RFC7518 §3.1 algorithms. It is only valid in combination with the following: |
true |
false |
String |
|
Certificate of trust for a single asymmetric RSA public key. |
true |
false |
ProtectedStringType |
|
Complex type holding information about a a key and a keystore holding it. |
true |
false |
Complex AbstractKeyStoreKeyType |
|
Uri for the user info endpoint of the OIDC authentication provider. When not present, midPoint will rely on the information available on the OIDC discovery endpoint |
false |
true |
String |
Token configuration 2
| For better clarity, we’ll list token related fields in two tables. First table lists public key retrieval methods. Second table the miscellaneous fields. |
Token validation methods
Fields in this table are all mutually exclusive and evaluated in the order they are listed:
| Name | Description | JWT-relevant | Opaque-relevant | Type |
|---|---|---|---|---|
|
Certificate of trust for a single asymmetric RSA public key. |
true |
false |
ProtectedStringType |
|
Complex type holding information about a a key and a keystore holding it. |
true |
false |
Complex AbstractKeyStoreKeyType |
|
OIDC provider’s public key |
true |
false |
ProtectedStringType |
|
Uri for the JSON Web Key (JWK) Set endpoint. |
true |
false |
String |
|
URI for the OIDC authentication provider. Relies on the |
true |
true |
String |
Miscellaneous fields
| Name | Description | JWT-relevant | Opaque-relevant | Type |
|---|---|---|---|---|
|
Realm name midPoint will use in WWW-Authenticate header. |
true |
true |
String |
|
Name of the attribute, included in the token, referring to the subject of authentication, such as Default value is |
true |
true |
String |
|
It specifies the cryptographic algorithm used by the OIDC provider for digital signatures. Potential values are RFC7518 §3.1 algorithms. It is only valid in combination with the following: |
true |
false |
String |
|
Uri for the user info endpoint of the OIDC authentication provider. When not present, midPoint will rely on the information available on the OIDC discovery endpoint |
false |
true |
String |
AbstractKeyStoreKeyType section
| Name | Description | Required | Type |
|---|---|---|---|
|
Path to the keystore file |
true |
String |
|
Password for the keystore |
true |
ProtectedStringType |
|
Alias of the private key in the keystore |
true |
ProtectedStringType |
|
Password for the private key with the keyAlias in the keystore |
true |
ProtectedStringType |
Example
This is a simple example of OIDC module configuration, using sample values.
<securityPolicy>
<authentication>
<modules>
...
<!-- OIDC module for REST demo -->
<oidc>
<identifier>oidcResourceServer</identifier>
<resourceServer>
<jwt> <!-- or opaqueToken -->
<issuerUri>https://keycloak.lab.evolveum.com/auth/realms/test</issuerUri>
<nameOfUsernameClaim>preferred_username</nameOfUsernameClaim>
</jwt>
</resourceServer>
</oidc>
...
</modules>
</authentication>
</securityPolicy>
Add a sequence referencing the OIDC module
An authentication sequence defines the authentication flow for a particular channel. It specifies which authentication modules are used and how they participate in the authentication process. To enable OIDC authentication for the GUI, configure a sequence for the GUI channel and reference the OIDC module in it.
The sequence has the following fields:
| Name | Description | Required | Type |
|---|---|---|---|
|
Unique sequence identifier. Can be used to reference the |
true |
String |
|
Specification of the channel(s) this authentication sequence applies to (GUI, REST, etc.) |
true |
Complex channel type |
|
Specification of an authentication module used in this sequence. At least one module is required |
true |
Complex module type |
|
A short identifier for administrator diagnostics. Not meant as a user-friendly label. Must be unique. Deprecated, use |
false |
String |
|
Display name of the sequence, shown for identifying the authentication sequence in the GUI. |
false |
String |
|
Free form description (administrator comment). |
false |
String |
|
Required assignment target(s). The authenticated user must hold all of the listed assignment targets. If not, the authentication sequence will fail. For multiple targets, add this parameter multiple times, each time with a single value. Example use case: emergency administrator access - can only work for administrator roles. Example value: |
false |
ObjectReferenceType |
|
Required node group(s) The authenticated user must carry one of the listed node groups (archetypes). If none applies, the authentication sequence will fail. For multiple targets, add this parameter multiple times, each time with a single value. Example use case: Only managers can log in to the GUI, but not regular users. Example value: |
false |
ObjectReferenceType |
|
Controls updating of focus authentication behaviour attributes (e.g. failed login count, lockout state) Possible values: enabled - update focus authentication behaviour attributes on every login disabled - never update focus authentication behaviour attributes failureOnly - update focus authentication behaviour attributes only on failure Default value is |
false |
String |
|
While you can have multiple REST sequences configured, e.g., Basic Authentication and OIDC, you can only use one OIDC sequence configuration at any given time. If your configuration contains multiple OIDC sequence definitions, midPoint will consider the first one and skip the others. |
See an example sequence below.
Available fields in channel section
| Name | Description | Required | Type |
|---|---|---|---|
|
Name (URI) of the channel this configuration applies to. The value for OIDC REST sequence is: http://midpoint.evolveum.com/xml/ns/public/common/channels-3#rest |
true |
String |
|
Free form description (administrator comment). |
false |
String |
|
Specifies whether this sequence is the default one for the given channel. It is used, when no specific sequence is requested (e.g. via URL suffix). It is recommended to keep one default sequence for each channel in use. |
false |
Boolean |
|
URL suffix used to select this authentication sequence specifically. Must not contain a slash ( |
true |
String |
Available fields in module section
| Name | Description | Required | Type |
|---|---|---|---|
|
Unique module identifier. Used to reference the module by |
true |
String |
|
Reference to the authentication module name. Value must match the name of an existing authentication module. Deprecated, use |
false |
String |
|
Free form description (administrator comment). |
false |
String |
|
Ordering number for the module within the sequence. Modules are sorted by Modules sharing the same order may be evaluated in parallel where the authentication mechanism allows it. Default value is |
false |
Integer |
|
Level of requirement for this module. Possible values are: Default value is: |
false |
String |
Example
This is a simple example of OIDC module configuration, using sample values.
<securityPolicy>
<authentication>
...
<!-- Sequence referencing the OIDC REST module demo -->
<sequence>
<identifier>rest</identifier>
<channel>
<channelId>http://midpoint.evolveum.com/xml/ns/public/common/channels-3#rest</channelId>
<default>true</default>
<urlSuffix>rest-default</urlSuffix>
</channel>
<module>
<identifier>oidcResourceServer</identifier>
<order>10</order>
<necessity>sufficient</necessity>
</module>
</sequence>
...
</authentication>
</securityPolicy>