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

Fix OIDC Security event fired before runtime config ready in Arc #37819

Conversation

michalvavrik
Copy link
Contributor

I have app here https://github.com/quarkus-qe/quarkus-test-suite/blob/main/security/oidc-client-mutual-tls/src/test/java/io/quarkus/ts/security/oidcclient/mtls/IncorrectKsFileTypeOidcMtlsIT.java which shows me that this code can be run before runtime config mappings are ready to be accessible from CDI as beans.

21:49:56,271 INFO  [app] Caused by: [CIRCULAR REFERENCE: io.smallrye.mutiny.CompositeException: Multiple exceptions caught:
21:49:56,271 INFO  [app] 	[Exception 0] java.lang.RuntimeException: OIDC Server is not available
21:49:56,271 INFO  [app] 	[Exception 1] java.lang.NullPointerException: Cannot invoke "io.quarkus.security.runtime.SecurityConfig.events()" because the return value of "io.quarkus.arc.InstanceHandle.get()" is null]

Following workaround fixed issue for me. I don't think we can or should delay execution of this code in any way. I'll suggest to use QE test as test coverage for this for now, because I'm busy ATM.

@quarkus-bot

This comment has been minimized.

@michalvavrik michalvavrik force-pushed the feature/fix-oidc-event-fired-before-config-ready branch from 92d0dc5 to 17c9b47 Compare December 18, 2023 23:10
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 18, 2023

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@sberyozkin sberyozkin merged commit 235b7f3 into quarkusio:main Dec 18, 2023
22 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.7 - main milestone Dec 18, 2023
@michalvavrik michalvavrik deleted the feature/fix-oidc-event-fired-before-config-ready branch December 18, 2023 23:52
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.

None yet

2 participants