- Notifications
You must be signed in to change notification settings - Fork3k
Provide fluent API to set upSecurityIdentityAugmentors andIdentityProviders such as Security JPA programmatically#51279
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
michalvavrik commentedNov 27, 2025
- part of theProvide a fluent API to set up Quarkus Security #16728 effort
This comment has been minimized.
This comment has been minimized.
3d9f827 to86e5b6aComparegithub-actionsbot commentedNov 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
🎊 PR Preview3f428b9 has been successfully built and deployed tohttps://quarkus-pr-main-51279-preview.surge.sh/version/main/guides/
|
Status for workflow |
This comment has been minimized.
This comment has been minimized.
| * | ||
| * @return Quarkus Security JPA {@link IdentityProvider}s | ||
| */ | ||
| staticCollection<IdentityProvider<?>>jpa() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Cansecurity-jpa support more than one IdentityProvider ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can
security-jpasupport more than one IdentityProvider ?
Yes. Form-based authentication requires other provider. You can check out my tests, thehttpSecurity.mechanism(form, jpa) wouldn't work.
| * Registers given {@link HttpAuthenticationMechanism} in addition to all other global authentication mechanisms. | ||
| * | ||
| * @param mechanism {@link HttpAuthenticationMechanism} | ||
| * @param identityProviders {@link IdentityProvider}s that should be used for authentication instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What is not clear to me is why these identity providers and augmentors must be used instead of CDI registered identity providers and augmentors, while the mechanism is not meant to be used instead of other mechanisms.
michalvavrikNov 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Before I answer, I would like to summarize so that we speak about the same thing:
- this method adds a new mechanism (like
new CustomAuthMechanismor any other mechanism at all) and allows you to use your own identity providers and augmentors - if you want to use global identity providers or augmentors, then don't use it
- if you want to use global identity providers/augmentors and some other providers/augmentors, specific for only this mechanism, you can create collection with global identity providers/augmentors and your own, specific for only this mechanism; nothing stops you
What is not clear to me is why these identity providers and augmentors must be used instead of CDI registered identity providers and augmentors, while the mechanism is not meant to be used instead of other mechanisms.
- how many times do you want to use both identity providers registered as CDI beans and dedicated ones for this mechanism? I'd say you usually need one or two
- this methods facilitates programmatic setup for Quarkus Security JPA, if with
httpSecurity.basic()we already use Quarkus Security JPA from CDI, then why would we need the programmatic setup at all? Only answer I could come with is flexibility - unlike CDI providers, which are there for every mechanism, here you can explicitly select which provider and augmentors you want to apply
michalvavrik commentedNov 28, 2025
I run the OIDC wiremock IT Module tests and they are passing for me locally. |
quarkus-botbot commentedNov 28, 2025 • edited by github-actionsbot
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by github-actionsbot
Uh oh!
There was an error while loading.Please reload this page.
Status for workflow |
