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

Enhance Elytron Security extension to support a database as identity store #3586

Closed
danielpetisme opened this issue Aug 19, 2019 · 3 comments
Labels
kind/enhancement New feature or request
Milestone

Comments

@danielpetisme
Copy link
Contributor

danielpetisme commented Aug 19, 2019

Description
(Describe the feature here.)
The goal of this feature would be to enhance the existing quarkus-elytron-security extension (which covers only a file based identity store currently) to take benefits of Elytron Security supports for Database as identity store.

Implementation ideas
(If you have any implementation ideas, they can go here, however please note that all design change proposals should be posted to the Quarkus developer mailing list (or the corresponding Google Group; see the decisions process document for more information).

The discussion started here
https://groups.google.com/d/msg/quarkus-dev/fihoprhf_DE/8ZYlptFoAgAJ

@danielpetisme danielpetisme added the kind/enhancement New feature or request label Aug 19, 2019
@loicmathieu
Copy link
Contributor

@danielpetisme the quarkus-elytron-security extension only cover basic authentication via a user/password file or embedded in application.properties not Oauth2.
But it's the right place to add an other identity store (an IdentityManager in Elytron security).

@danielpetisme
Copy link
Contributor Author

danielpetisme commented Aug 22, 2019

@loicmathieu can you provide some guidance for the DB identity store please?

What I understood:

  • the feature will be hosted by the existing quarkus-elytron-security extension
  • Provide a DatabaseRealmConfig with properties to define (define a datasource or reuse the one define by hibernate, define the SQL queries, etc.)
  • I can look SecurityDeploymentProcessor#configureFileRealmAuthConfig to see how to deploy the feature

Am I correct so far? Should I pain attention to other points?

@loicmathieu
Copy link
Contributor

For the implementation, you should create a new identity store based on Elytron Database Identity Store and configure it inside io.quarkus.elytron.security.deployment.SecurityDeploymentProcessor.

As you said, I think it's just providing your realm like it is done in the SecurityDeploymentProcessor#configureFileRealmAuthConfig

For a first implementation I assume it's OK to depends on the current Datasource, be careful that you will add a dependency to agroal for this, try to make it optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants