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

Issue with the SecurityIdentity on the IO Thread #13866

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

stuartwdouglas
Copy link
Member

This will no longer wrap the Identity in a Uni if
proactive auth is in use.

This also resolves a problem with setting the current
SecurityIdentity via a CDI event, which is not
compatible with lazy authentication.

Note that the problem can still occur if using lazy
auth from the IO thread, which is expected. To get
the identity in this situation you need to use
CurrentIdentityAssociation#getDeferredIdentity
and subscribe to the result.

Fixes #13835

@sberyozkin
Copy link
Member

Hi Stuart, one test is failing,

 SimpleRouteTest.testSecurityIdentityInjection:71 1 expectation failed.
Response body doesn't match expectation.
Expected: is "alice"
  Actual: 

This will no longer wrap the Identity in a Uni if
proactive auth is in use.

This also resolves a problem with setting the current
SecurityIdentity via a CDI event, which is not
compatible with lazy authentication.

Note that the problem can still occur if using lazy
auth from the IO thread, which is expected. To get
the identity in this situation you need to use
CurrentIdentityAssociation#getDeferredIdentity
and subscribe to the result.

Fixes quarkusio#13835
@sberyozkin sberyozkin merged commit d896754 into quarkusio:master Dec 16, 2020
@ghost ghost added this to the 1.11 - master milestone Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment