Skip to content
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

Update 'quarkus-oidc' and 'quarkus-oidc-client' to get secrets from CredentialsProvider #18073

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

sberyozkin
Copy link
Member

@sberyozkin sberyozkin commented Jun 22, 2021

Fixes #15125.

This PR has the following updates:

  • introduces Credentials.Provider configuration group
  • Both Credentials.Secret and Credentials.Jwt groups can use a client secret; so Credentials.Secret now has a provider property to specify a secret key (quarkus.oidc.credentials.client-secret.provider.key) that should be used to retrieve a secret, similarly for Jwt - but since Jwt can have not only a client secret but also a private key configured, the property is called secret-provider which one can use as quarkus.oidc.credentials.jwt.secret-provider.key
  • Updated some of the existing quarkus-oidc/quarkus-oidc-client tests to use a test CredentialsProvider
  • Updated OidcClient Authentication docs to refer to the new options and also added a similar section to the OIDC web-app docs since the config root is different
  • Few other minor doc and code updates

@sberyozkin sberyozkin force-pushed the oidc_credentials_provider branch 2 times, most recently from 1dc4afc to 64c181f Compare June 22, 2021 12:52
@radcortez
Copy link
Member

radcortez commented Jun 22, 2021

@radcortez Hi Roberto, can you please glance over the changes, I can not have Provider ConfigGroup initialized. I've tried many options - it is currently inside the Credentials/Secret bean, I tried to move it under Credentials and also under OidcTenantConfig. It is always empty. I'm 100% sure I'm doing something silly :-), just can't spot what :-)

Does this happen when you use a QuarkusDevModeTest?

@sberyozkin: Hi Roberto, it was happening but then after tweaking a few things in the code I made it work - it was a buggy draft PR :-), all is good in the configuration space, sorry for the noise

@sberyozkin sberyozkin force-pushed the oidc_credentials_provider branch from 64c181f to a865d76 Compare June 22, 2021 17:27
@sberyozkin sberyozkin force-pushed the oidc_credentials_provider branch from a865d76 to bd7165d Compare June 23, 2021 10:09
@sberyozkin sberyozkin marked this pull request as ready for review June 23, 2021 12:18
@sberyozkin sberyozkin force-pushed the oidc_credentials_provider branch from bd7165d to 967dfd6 Compare June 23, 2021 12:20
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 23, 2021

This workflow status is outdated as a new workflow run has been triggered.

🚫 This workflow run has been cancelled.

Failing Jobs - Building bd7165d

⚠️ Artifacts of the workflow run were not available thus the report misses some details.

Status Name Step Test failures Logs Raw logs
Initial JDK 11 Build Cache Maven Repository ⚠️ Check → Logs Raw logs

@sberyozkin sberyozkin requested a review from pedroigor June 23, 2021 12:29
@sberyozkin sberyozkin merged commit 659435d into quarkusio:main Jun 25, 2021
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jun 25, 2021
@sberyozkin sberyozkin deleted the oidc_credentials_provider branch June 25, 2021 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to apply provider to 'quarkus.oidc.credentials.secret' configuration key
3 participants