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
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)

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
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants