How to correctly use env properties with named OIDC clients #40492
Replies: 5 comments 4 replies
-
Thanks for following up on this @sberyozkin . Just a note, on my original comment I had added a copy paste typo where I pasted twice the PORT env var, instead of the HOST. Just to be clear that it was one env var for each, I edited the original comment, but you had already started typing here, which explains why we see PORT twice as well hehe. Let's hear what @radcortez has to say, let me know if I can provide more feedback guys, thanks for the support ;) |
Beta Was this translation helpful? Give feedback.
-
Yes, correct, you need a |
Beta Was this translation helpful? Give feedback.
-
Thanks @radcortez, I tested quarkus oidc client quickstart, updated the default OIDC client to have an @jorgebsa You mentioned that
I'm not sure why you could not make it work with If you'd like, try to reproduce a failure with the quarkus oidc client quickstart, in JVM mode |
Beta Was this translation helpful? Give feedback.
-
@sberyozkin I haven't had time to come back to this, but I plan to do it this week still. But before that, maybe you or @radcortez could help me with this configuration topic, so that I could try to be more precise when attempting to fix it. Got a couple questions: Assume that I have an application that will be distributed as a container image. This application is able to interact with any amount of third-party APIs, each of these APIs will require an OIDC client. However, the OIDC clients are only going to be defined at runtime by the client/devops/whomever is responsible for deploying it. I, as the developer, am not aware of the names of the OIDC clients at all at build-time. Because of this, I can't prefill application properties with empty values for the possible oidc clients. In this case, it would be impossible to configure the application solely via environment variables, due to the limitation around the namespace and possibility of -, is this assumption correct? Now assume that I were able to know the names, and for each oidc client around 4 or 5 properties need to be configured via env vars, do I need to prefill all of them with empty values, or would 1 be enough to have the rest mapped to the same named oidc-client? |
Beta Was this translation helpful? Give feedback.
-
@sberyozkin Sorry to budge in here but there seems to be weird issues with env properties still in 3.13.2. To configure OIDC clients using a .env file I need to name the properties:
Note the |
Beta Was this translation helpful? Give feedback.
-
@jorgebsa had issues with configuring the named OIDC client in #40469, so I'm opening a more focused discussion here. @jorgebsa commented at #40469:
So, here it is not a default client but a named one is used, for example, instead of
quarkus.oidc-client.proxy.host=a.b.c
, it isquarkus.oidc-client."abc-client".proxy.host=a.b.c
.Roberto, @radcortez, what I thought you explained awhile back, was that one had to declare an empty property like
quarkus.oidc-client.proxy.host=
before using an env property likeQUARKUS_OIDC_CLIENT_PROXY_HOST
due to the presence of-
inquarkus.oidc-client
.What about a named OIDC client, should it be
quarkus.oidc-client."abc-client".proxy.host=
followed by providing aQUARKUS_OIDC_CLIENT__ABC_CLIENT__PROXY_HOST
env property ?I wonder, should it be a double underscore
__
or just a single one:QUARKUS_OIDC_CLIENT_ABC_CLIENT_PROXY_HOST
?Thanks
Beta Was this translation helpful? Give feedback.
All reactions