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

Regression: Unexpected DisabledOidcClientException #40886

Closed
neon-dev opened this issue May 29, 2024 · 2 comments · Fixed by #40894
Closed

Regression: Unexpected DisabledOidcClientException #40886

neon-dev opened this issue May 29, 2024 · 2 comments · Fixed by #40894
Labels
area/oidc kind/bug Something isn't working
Milestone

Comments

@neon-dev
Copy link
Contributor

neon-dev commented May 29, 2024

Describe the bug

#37361 should allow us to set quarkus.oidc-client.client-enabled=false and use the @OidcClientFilter annotated REST client without trying (and failing) to acquire a token.
This is currently not the case:

io.quarkus.oidc.client.runtime.DisabledOidcClientException: 'Default' client configuration is disabled
	at io.quarkus.oidc.client.runtime.OidcClientRecorder$DisabledOidcClient.getTokens(OidcClientRecorder.java:251)
	at io.quarkus.oidc.client.runtime.TokensHelper.getTokens(TokensHelper.java:43)
	at io.quarkus.oidc.client.runtime.AbstractTokensProducer.getTokens(AbstractTokensProducer.java:65)
	at io.quarkus.oidc.client.reactive.filter.runtime.AbstractOidcClientRequestReactiveFilter.filter(AbstractOidcClientRequestReactiveFilter.java:31)

Expected behavior

Calling methods of the annotated REST client should not throw a DisabledOidcClientException.

Actual behavior

The call aborts with a DisabledOidcClientException.

How to Reproduce?

application.properties

quarkus.rest-client.test.url=http://localhost:8080/dev/null
quarkus.oidc-client.client-enabled=false
quarkus.oidc-client.auth-server-url=changeme
quarkus.oidc-client.client-id=changeme
quarkus.oidc-client.credentials.secret=changeme
quarkus.oidc-client.grant-options.client.resource=changeme

RestClient.java

@RegisterRestClient(configKey = "test")
@OidcClientFilter
public interface RestClient {
  @GET
  Response getSomething();
}

Call this client's method

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

3.10.2

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@neon-dev neon-dev added the kind/bug Something isn't working label May 29, 2024
@quarkus-bot
Copy link

quarkus-bot bot commented May 29, 2024

/cc @pedroigor (oidc), @sberyozkin (oidc)

@sberyozkin
Copy link
Member

Reproduced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/oidc kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants