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

Add a JPA Identity Extension #4347

Closed
stuartwdouglas opened this issue Oct 3, 2019 · 5 comments
Closed

Add a JPA Identity Extension #4347

stuartwdouglas opened this issue Oct 3, 2019 · 5 comments
Labels
kind/epic Large issue with links to sub-issues kind/extension-proposal Discuss and Propose new extensions
Milestone

Comments

@stuartwdouglas
Copy link
Member

This extension would allow for an easy annotation driven approach to creating JPA entities that represent a user. An entity can be annotated with @Username and @password (and maybe @salt) to inform Quarkus that this entity represents a user. Quarkus will then automatically wire up authentication based on this entity.

@stuartwdouglas stuartwdouglas added the kind/extension-proposal Discuss and Propose new extensions label Oct 3, 2019
@stuartwdouglas stuartwdouglas added this to the 1.0.0 milestone Oct 3, 2019
@paulrobinson paulrobinson modified the milestones: 1.0.0, 0.27.0 Oct 15, 2019
@FroMage FroMage self-assigned this Oct 24, 2019
@FroMage
Copy link
Member

FroMage commented Oct 24, 2019

Looking at it for prototyping.

@FroMage
Copy link
Member

FroMage commented Oct 24, 2019

Well, I stopped looking at it, but I do have a branch with the start of this. I hit the issue that it appears that the credentials are being looked up outside of a scope in which ArC can deliver an EntityManager (so probably outside the request scope), which I'm not sure how to fix. I can probably get an EntityManagerFactory and create one, but it's probably not right performance-wise?

@FroMage FroMage removed their assignment Oct 24, 2019
@stuartwdouglas
Copy link
Member Author

We need to create the request scope earlier then I guess. I was trying to avoid this as there is some complexity in dealing with this if the thread is propagated between different threads.

Creating an EntityManager is also a solution (and should not really be a perf issue, they are supposed to be fairly cheap), but it means that if we are going to stick the user entity into the SecurityIdentity then it will be a detached entity, although this might be ok.

@gsmet gsmet modified the milestones: 0.27.0, 1+ Oct 29, 2019
@Sanne
Copy link
Member

Sanne commented Nov 7, 2019

yes EntityManager instances are fairly cheap now. Feel free to ping me when this is done, happy to review the ORM usage to be kinda "lean".

+1 to detach entities as long as there's no uninitialized paths in the loaded graph - I assume it's going to be a simple, relationless entity?

@FroMage
Copy link
Member

FroMage commented Nov 21, 2019

It's almost done here: #5660

@paulrobinson paulrobinson added the kind/epic Large issue with links to sub-issues label Jan 7, 2020
@gsmet gsmet closed this as completed Feb 12, 2020
@gsmet gsmet modified the milestones: 1+, 1.3.0 Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/epic Large issue with links to sub-issues kind/extension-proposal Discuss and Propose new extensions
Projects
None yet
Development

No branches or pull requests

5 participants