-
Notifications
You must be signed in to change notification settings - Fork 2.9k
OIDC client/filter issues after migrating from previous to latest LTS #47232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
/cc @pedroigor (oidc), @sberyozkin (oidc) |
@radcortez Hi Roberto, can you please comment here ? |
An update from our side: a workaround is to name our OIDC clients (which also ensures that the above 2 properties no longer collide, as they become |
@DeMol-EE Can you please clarify again what exactly is the problem. I don't think we have Which 2 environment properties did you use in 3.15 to init |
Hello @sberyozkin , Sorry for my previous message (published too fast). We're colleagues with @DeMol-EE so I can answer your questions. So basically this was our configuration (environment variables) until before the upgrade to 3.20. QUARKUS_OIDC_CLIENT_AUTH_SERVER_URL: "${auth.base-url}/realms/foo"
QUARKUS_OIDC_CLIENT_CLIENT_ID: bar
QUARKUS_OIDC_CLIENT_CREDENTIALS_CLIENT_SECRET_METHOD: POST
QUARKUS_OIDC_CLIENT_CREDENTIALS_CLIENT_SECRET_VALUE: myclientsecret And it worked flawlessly. After upgrading to 3.20, the app didn't start anymore arguing that two clients were defined : 'client' and 'bar' When changing The error was
So what we did is replace And make the following changes to our configuration (environment variables) QUARKUS_OIDC_CLIENT__BAR__AUTH_SERVER_URL: "${auth.base-url}/realms/foo"
QUARKUS_OIDC_CLIENT__BAR__CLIENT_ID: bar
QUARKUS_OIDC_CLIENT__BAR__CLIENT_NAME: bar
QUARKUS_OIDC_CLIENT__BAR__CREDENTIALS_CLIENT_SECRET_METHOD: POST
QUARKUS_OIDC_CLIENT__BAR__CLIENT_ENABLED: "true"
QUARKUS_OIDC_CLIENT__BAR__CREDENTIALS_CLIENT_SECRET_VALUE: myclientsecret To answer your latest question : the env QUARKUS_OIDC_CLIENT_CLIENT_ID is documented hereunder Also note that I'm not sure |
Thanks @YassinHajaj, just let me ask about the first configuration block:
Are you saying this configuration block causes the error related to the |
@sberyozkin this is correct indeed (only starting from the new LTS) |
Yes, sorry, I got confused. So, it is not clear to me at what point
|
|
The configuration in question was tried as part of our resolution investigation, see my previous comment.
But it's not part neither of the old or the new configuration. Was just something we've tried out and that could cause an overlap with another config when used using environment variables (see original comment of @DeMol-EE) |
@YassinHajaj @DeMol-EE OK, so
causes the error about Do you have anything configured in |
This is correct indeed. Here are the build time properties related to quarkus.oidc. application.properties quarkus.oidc.tenant-enabled=false
quarkus.oidc.realm1.auth-server-url=${auth.base-url}/realms/realm1
quarkus.oidc.realm2.auth-server-url=${auth.base-url}/realms/realm2
quarkus.oidc.realm3.auth-server-url=${auth.base-url}/realms/realm3
quarkus.oidc.foo.auth-server-url=${auth.base-url}/realms/foo
quarkus.oidc-client.early-tokens-acquisition=false Latest change to those is in 2023, no change since. |
OK, thanks @YassinHajaj, @DeMol-EE @radcortez Roberto, I hoped I might be able to clarify things but looks like your help is required, please see the last two comments above, does it ring any bell ? FYI, in the last comment above, the default Quarkus OIDC tenant is
? |
Hi @sberyozkin , No we don't define The only properties we have are those shared in my previous comment. |
@YassinHajaj OK.
This configuration has 2 OIDC tenant configurations: default tenant and Setting
causes a startup failure related to Please have a look when you get a chance |
Hi @radcortez, can you please comment here |
I'll have a look. |
Yes, the issue here is I can probably fix this by sorting the names, from most significant to less significant, in this case For cases where we have these clashes, our recommendation is to set the expected name in |
Thanks for the feedback. |
This should help: smallrye/smallrye-config#1346 |
@radcortez with smallrye/smallrye-config#1346 having been merged, what remains to be done on the Quarkus side so we can fix this? |
This still needs to be released from the SR Config side... I'll do that this week. |
👌🏽 |
Thanks a lot, guys! |
Hi @gastaldi, can we also integrate it into the next LTS version, 3.20.x? This issue prevents us from making a safe LTS-to-LTS transition. |
@andrejpetras thanks, I've marked to backport to 3.20 too |
Describe the bug
Migrating from the previous LTS to 3.20, we are getting issues with our OIDC clients/filters. More specifically, we get:
While searching the documentation for an answer, I noticed that there are two properties which I assume must be colliding when specified as environment variables (all caps and underscores):
quarkus.oidc-client.id
quarkus.oidc.client-id
I further noticed that the errors disappears when changing QUARKUS_OIDC_CLIENT_CLIENT_ID to QUARKUS_OIDC_CLIENT_ID, but then the application is not behaving as expected anymore, as we get 403s.
As these properties were already there in the previous LTS, perhaps this is not the cause of our issues, but I figured I could point it out either way.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:16 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6000 arm64
Output of
java -version
OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode, sharing)
Quarkus version or git rev
3.20
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Additional information
No response
The text was updated successfully, but these errors were encountered: