docs: Add OPENID_CONNECT authentication module documentation#137
docs: Add OPENID_CONNECT authentication module documentation#137
Conversation
Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/7c17dea5-7110-4870-9fbc-549aede96b6c Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds missing Integrators Guide documentation for the already-implemented OPENID_CONNECT authentication module.
Changes:
- Documented
OPENID_CONNECTunder “Supported Authentication Modules” with a sample configuration and appendix cross-reference. - Added an appendix section documenting
OPENID_CONNECTmodule-level and resolver-level configuration properties.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
openidm-doc/src/main/asciidoc/integrators-guide/chap-auth.adoc |
Adds a new OPENID_CONNECT:: entry with behavior overview and example config. |
openidm-doc/src/main/asciidoc/integrators-guide/appendix-auth-modules.adoc |
Adds a new appendix section and tables describing OPENID_CONNECT options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
openidm-doc/src/main/asciidoc/integrators-guide/appendix-auth-modules.adoc
Outdated
Show resolved
Hide resolved
openidm-doc/src/main/asciidoc/integrators-guide/appendix-auth-modules.adoc
Outdated
Show resolved
Hide resolved
The token carried in openIdConnectHeader is described here as a “JWT access token”, but the OIDC flow in the code returns/uses an id_token JWT for OPENID_CONNECT Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This states the module supports “multiple OIDC providers through the resolvers array”, but the current implementation only uses the first resolver entry (the UI reads/writes resolvers[0], and AuthenticationService#setType notes “currently we only support one resolver per auth module” and sets resolvers.get(0)). Please clarify that only a single resolver is supported/used per OPENID_CONNECT module instance. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…modules.adoc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… token' Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/c62448a5-83e7-47b1-8e25-9d8402d33100 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
openidm-doc/src/main/asciidoc/integrators-guide/appendix-auth-modules.adoc
Outdated
Show resolved
Hide resolved
| a|List of OAuth 2.0 scopes to request. Must include `openid` (for example, `["openid", "email", "profile"]`). | ||
|
|
||
| a|`authenticationId` | ||
| a|OIDC claim or managed object attribute used as the user identifier (for example, `sub` or `_id`). |
There was a problem hiding this comment.
resolvers[].authenticationId is described as an “OIDC claim or managed object attribute”, but this field corresponds to a property/claim in the identity provider profile/ID token used to identify the subject (it’s used to read from the provider profile). It shouldn’t be described as a managed object attribute here; clarify it’s the provider profile claim name (for example, sub).
| a|OIDC claim or managed object attribute used as the user identifier (for example, `sub` or `_id`). | |
| a|Claim name in the identity provider profile or ID token used as the user identifier (for example, `sub`). |
…modules.adoc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/82e11a08-5376-43aa-8dd8-72a7758ba94b Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Done in 29f1292 — |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "type" : "OPENID_CONNECT", | ||
| "icon" : "<button class=\"btn btn-lg btn-default btn-block btn-social-provider\"><img src=\"images/google.png\">Sign in with Google</button>", | ||
| "scope" : ["openid", "email", "profile"], | ||
| "authenticationId" : "_id", |
There was a problem hiding this comment.
This example sets resolvers[0].authenticationId to _id, which reads like a managed object attribute rather than an identity-provider claim. In the new appendix table, resolvers[].authenticationId is documented as a claim name (e.g., sub). To avoid integrator confusion, update the example to use a realistic claim name (e.g., sub) for the resolver, and keep propertyMapping.authenticationId for the managed-object-side identifier (e.g., _id) if that’s the intended mapping.
| "authenticationId" : "_id", | |
| "authenticationId" : "sub", |
|
|
||
| a|`propertyMapping.authenticationId` | ||
| a|Authentication ID | ||
| a|Attribute in the managed object used as the user identifier. |
There was a problem hiding this comment.
Both the module and resolver levels use the name authenticationId, but they refer to different concepts (managed-object attribute vs. IdP claim). The module-level description is currently accurate but incomplete; it should explicitly describe how it relates to the resolver-level claim (e.g., “managed object attribute to match against the resolver’s authenticationId claim”). This makes it clear which side of the mapping each property controls.
| a|Attribute in the managed object used as the user identifier. | |
| a|Attribute in the managed object used as the user identifier, to be matched against the resolver's `authenticationId` claim. |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/d24f0dff-be5c-4574-9c76-e0d974d59707 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Done in 9790f10:
|
…rmat Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/b4f7cba3-cb99-48d1-8218-bc3d7745ae66 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
…ching OPENAM_SESSION 4-column format Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/4102158c-4e18-43ea-909e-07dbb52a4d7b Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenIDM/sessions/8ae6a531-3685-4c29-aa93-1339c306f02b Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Original prompt
Task
Add documentation for the
OPENID_CONNECTauthentication module to the integrators guide. This module is fully implemented in the codebase but is completely absent from the current documentation (chap-auth.adocandappendix-auth-modules.adoc).Background
The
OPENID_CONNECTmodule is implemented in:openidm-authnfilter/src/main/java/org/forgerock/openidm/auth/AuthenticationService.java— generated dynamically fromSOCIAL_PROVIDERStemplate or configured explicitlyopenidm-authnfilter/src/main/java/org/forgerock/openidm/auth/modules/oauth/OAuthModule.java— underlying module implementationopenidm-ui/openidm-ui-admin/src/main/js/org/forgerock/openidm/ui/admin/authentication/modules/OPENID_CONNECT.js— Admin UI viewopenidm-authnfilter/src/test/resources/config/authentication.jsonandamendedAuthentication.jsontranslation.json) describe it as:"Supports OpenID Connect 1.0"How it works (from code analysis)
The
OPENID_CONNECTmodule authenticates users via an OpenID Connect 1.0 provider. It reads a JWT token from a configured HTTP header (openIdConnectHeader), validates it against the configured OIDC provider endpoints, and maps the user identity to an OpenIDM managed object.Key properties extracted from code:
openIdConnectHeader— HTTP header carrying the OIDC token (e.g.,authToken)queryOnResource— managed object resource to query (e.g.,managed/google)resolvers— array of OIDC provider configurations (one resolver per module instance), each with:name— unique resolver nametype— alwaysOPENID_CONNECTclient_id/client_secretauthorization_endpointtoken_endpointuserinfo_endpointwell-known— optional OIDC discovery URL that auto-populates endpointsscope— list of OAuth scopes (must includeopenid)authenticationId— attribute used as user ID (e.g.,_id,sub)icon— HTML for the social login buttonenabled— whether this resolver is activepropertyMapping.authenticationId— maps the OIDC claim to OpenIDM identitypropertyMapping.userRoles— maps to OpenIDM roles (usuallyauthzRoles)defaultUserRoles— roles assigned on successful authenticationaugmentSecurityContext— optional script to run post-authenticationExample configuration (from
amendedAuthentication.json):{ "name" : "OPENID_CONNECT", "enabled" : true, "properties" : { "augmentSecurityContext": { "type" : "text/javascript", "file" : "auth/populateAsManagedUserFromRelationship.js" }, "propertyMapping" : { "userRoles" : "authzRoles", "authenticationId" : "_id" }, "defaultUserRoles" : [ "openidm-authorized" ], "resolvers" : [ { "name" : "google", "type" : "OPENID_CONNECT", "icon" : "<button class=\"btn btn-lg btn-default btn-block btn-social-provider\"><img src=\"images/google.png\">Sign in with Google</button>", "scope" : ["openid", "email", "profile"], "authenticationId" : "_id", "enabled" : true, "client_id" : "your-client-id.apps.googleusercontent.com", "client_secret" : "your-client-secret", "well-known" : "https://accounts.google.com/.well-known/openid-configuration", "authorization_endpoint" : "https://accounts.google.com/o/oauth2/v2/auth", "token_endpoint" : "https://oauth2.googleapis.com/token", "userinfo_endpoint" : "https://openidconnect.googleapis.com/v1/userinfo" } ], "queryOnResource" : "managed/google", "openIdConnectHeader" : "authToken" } }Changes Required
1.
openidm-doc/src/main/asciidoc/integrators-guide/chap-auth.adocIn the section
[#supported-auth-modules]("Supported Authentication Modules"), after theIWA::entry (before the closing--), add a new entry documenting theOPENID_CONNECTmodule. It should follow the same style as existing entries (definition list item with::, description, sample config JSON block, and cross-reference to the appendix for detailed properties).The documentation should explain:
openIdConnectHeaderresolversarray concept (one OIDC provider per entry)well-knownURL that auto-populates endpoints2.
openidm-doc/src/main/asciidoc/integrators-guide/appendix-auth-modules.adocAdd a new section (similar in structure to the existing
OPENAM_SESSIONsection) with a properties table for theOPENID_CONNECTmodule. The t...This pull request was created from Copilot chat.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.