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

Improves documentation on SecurityIdentityAugmentor with Hibernate #30283

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

vanny96
Copy link

@vanny96 vanny96 commented Jan 10, 2023

The example at Security Tips and Tricks for Hibernate doesn't work as it results in a ContextNotActiveException (See issue 12640).

The proper solution to use Hibernate in a SecurityIdentityAugmentor is to create a class which extends Supplier and annotate its get method with @ActivateRequestContext

This MR provides this solution as the example to use in the documentation

@geoand geoand requested a review from sberyozkin January 10, 2023 14:40
@vanny96 vanny96 force-pushed the main branch 3 times, most recently from b9879ed to 053c38b Compare January 12, 2023 08:40
Copy link
Member

@sberyozkin sberyozkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vanny96, thanks for the PR, @loicmathieu, can you please review it can work as expected given your earlier case ?

Copy link
Contributor

@loicmathieu loicmathieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test the changes but as long as the request context is activated using the annotation on a CDI bean method it should work.

@vanny96 vanny96 force-pushed the main branch 5 times, most recently from 3329020 to c689a50 Compare January 23, 2023 09:35
@sberyozkin
Copy link
Member

@vanny96 Can you please squash the last commit ? Thanks

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 30, 2023
@gastaldi gastaldi merged commit c943dec into quarkusio:main Jan 31, 2023
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 31, 2023
@github-actions
Copy link

🙈 The PR is closed and the preview is expired.

@quarkus-bot quarkus-bot bot added this to the 2.17 - main milestone Jan 31, 2023
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.

5 participants