Question: is it possible to authenticate clients against multiple clients data sources (first successful finish checking)? #82
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
KittenSquad/glewlwyd#82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Something like:
I have configured three clients backends: two LDAP and one database client backend.
Client try to get JWT token (in client_credential flow):
Is it possible with glewlwyd?
Hello,
You can have multiple backends for users and clients. Therefore the client verification flow goes like this:
not found, checks the next client backendokorunauthorized, stops the search and returns the valuenot found, then returnsunauthorizedSo there's a difference between
not foundandfound but password or client_secret invalid.I assumed it works that way, but...
When "Database backend client module" is first, I can't authenticate clients against LDAP (AD) - every time in logs I have:
Glewlwyd DEBUG: oauth2 check_auth_type_client_credentials_grant - Error client_d 'CLIENT_ID' invalidWhen "LDAP backend client module" is first, LDAP (AD) authentication works...
Hello,
Can you explain what flow you are using to get this error?
Also, what is the plugin used? Oauth2 or OIDC?
Are the client and user LDAP backends in readonly?
I can't reproduce your bug but probably your configuration will help me to
Start new, clean docker instance:
docker run --rm -it -p 4593:4593 babelouest/glewlwydor
docker run --rm -it -p 4593:4593 src:20200108(I built this docker today).Add proper "LDAP backend client module" (read only) - you can see clients in frontend.
So you have two client modules:
0. Database backend client module (it's empty now, but it's first. When it contains clients it's the same...).
1. LDAP backend client module.
Add oauth2 plugin (I only filled name: "oauth2", display name: "oauth2", and Tokens signature - JWT type: "RSA", Key size: "512 bits", and public and private key).
When you try to obtain token in Client credentials flow, you have "HTTP/1.1 403 Forbidden".
When you change the order (LDAP backend client module is first), you can get token.
Hello,
Thanks to your additional information, I could pinpoint the bug, this should be fixed in
github.com/babelouest/glewlwyd@4f297a993enow, can you validate the fix?Yes, with docker I built today no matter what the order is clients data sources, I can always obtain token.
Thanks.