max
max

Reputation: 1266

Quarkus Security: Using JPA security in combination with LDAP Authentication

We would like to store our users and roles in the internal database. This can be easily done by following the security-jpa tutorial. (https://quarkus.io/guides/security-jpa)

But the implementation assumes that the authentication is done via a password (@Password annotation) stored in the DB as well. We would like to authenticate the users against an LDAP and then assign the roles based on what is stored in our DB.

Is there any tutorial / interceptor available? I am happy for every input?

PS: The quarkus security-ldap extension is not the solution as it assumes that also the roles are stored in LDAP.

Upvotes: 1

Views: 555

Answers (1)

Henrique Machado
Henrique Machado

Reputation: 131

So take a look at this: https://quarkus.io/guides/security-customization

You can solve it implementing a SecurityIdentityAugmentor

in the method "build" you can query the database to get the roles and add it do the authenticated user. Henrique

Upvotes: 1

Related Questions