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

4.x - OidcCdiExtension should not require configuration #8493

Closed
romain-grecourt opened this issue Mar 19, 2024 · 2 comments · Fixed by #8603
Closed

4.x - OidcCdiExtension should not require configuration #8493

romain-grecourt opened this issue Mar 19, 2024 · 2 comments · Fixed by #8603
Assignees
Labels
4.x Version 4.x bug Something isn't working P2 security
Projects
Milestone

Comments

@romain-grecourt
Copy link
Contributor

Environment Details

  • Helidon Version: 4.0.6
  • Helidon MP

Problem Description

If you have io.helidon.microprofile:helidon-microprofile-oidc in your class-path, it should only activate if the required configuration is present.

Currently (4.0.6), if there is no security configuration the server startup fails:

Exception in thread "main" io.helidon.config.MissingValueException: Requested value for configuration key '' is not present in the configuration.
	at io.helidon.config.MissingValueException.create(MissingValueException.java:44)
	at io.helidon.config.ConfigValue.lambda$get$0(ConfigValue.java:93)
	at java.base/java.util.Optional.orElseThrow(Optional.java:403)
	at io.helidon.config.ConfigValue.get(ConfigValue.java:93)
	at io.helidon.security.providers.oidc.OidcFeature$Builder.findMyKey(OidcFeature.java:657)
	at io.helidon.security.providers.oidc.OidcFeature$Builder.config(OidcFeature.java:715)
	at io.helidon.security.providers.oidc.OidcFeature.create(OidcFeature.java:209)
	at io.helidon.microprofile.oidc.OidcCdiExtension.registerOidcSupport(OidcCdiExtension.java:48)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)

Steps to reproduce

Add the following dependency to your pom.xml, make sure there is no security configuration.

<dependency>
    <groupId>io.helidon.microprofile</groupId>
    <artifactId>helidon-microprofile-oidc</artifactId>
</dependency>
@romain-grecourt
Copy link
Contributor Author

romain-grecourt commented Mar 26, 2024

@tomas-langer
Copy link
Member

You need to add enabled: false, otherwise this will most likely still fail (would need to test it to be sure)

@barchetta barchetta modified the milestones: 4.0.7, 4.0.8 Mar 28, 2024
@barchetta barchetta added the P2 label Mar 28, 2024
@barchetta barchetta moved this from Triage to High priority in Backlog Mar 28, 2024
@tomas-langer tomas-langer moved this from High priority to Sprint Scope in Backlog Apr 2, 2024
Backlog automation moved this from Sprint Scope to Closed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x bug Something isn't working P2 security
Projects
Backlog
  
Closed
Development

Successfully merging a pull request may close this issue.

3 participants