jakartaee / jakartaee/security

How to configure @OpenIdAuthenticationMechanismDefinition in a dynamic way?

Open
#291 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
66
Forks
43
PR merge metrics
No merged PRs in 30d

Description

I try to find out a way to configure `@OpenIdAuthenticationMechanismDefinition` in a more dynamic way.

Of course you can provide the values for `OPENID_PROVIDERURI`, the `OPENID_CLIENTID` or the `OPENID_CLIENTSECRET` by defining the corresponding environment variables or use EL and a config CDI Bean.

But it seems that more complex params like `scope` or `extraParameters` can only be hard coded in @OpenIdAuthenticationMechanismDefinition.

This means you can't write an interoperable application using different OpenID providers. You have to implement several Beans for each Provider and encapsulate them in separate libraries which you can than bundle with your application.

https://stackoverflow.com/questions/76468527/how-to-use-el-in-extraparameters-attribute-of-the-openidauthenticationmechanism

Did I miss something here or is this an know issue?

Concrete we need to develop an application that runs in produciton with ForgeRock and in Test with Auth0. Both providers need custom configuration in the `scope` and `extraParameters`

Contributor guide

Open the contributing guide

Research direction

Start by examining the @OpenIdAuthenticationMechanismDefinition annotation and the configuration paths mentioned for OPENID_PROVIDERURI, OPENID_CLIENTID, OPENID_CLIENTSECRET, scope, and extraParameters. The desired outcome is a supported way to vary scope and extraParameters for ForgeRock and Auth0 without implementing separate provider-specific beans or libraries.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.