fix(auth): Bind with specified credentials for login function if cred…#54
fix(auth): Bind with specified credentials for login function if cred…#54rezib merged 2 commits intorackslab:mainfrom
Conversation
…r own groups Closes rackslab#587 Depends on rackslab/RFL#54
…r own groups Closes rackslab#587 Depends on rackslab/RFL#54
…r own groups Closes rackslab#587 Depends on rackslab/RFL#54
2ea3b44 to
0997aa2
Compare
…r own groups Closes rackslab#587 Depends on rackslab/RFL#54
|
Tested to not break when upgrading just RFL and to use the new defaults when |
rezib
left a comment
There was a problem hiding this comment.
Ok thanks for the update! I think the logic and naming are fine now. This new code deserves unit tests to:
- Cover the lookup_as_user attribute assignment logic,
- Check login() calls _bind() or not, depending on value of look_up_user attribute.
Can you consider adding these tests?
I don't really think these would bring a benefit. And testing the attribute assignment logic would essentially be a copy of the block in the |
The purpose of these tests is not really to validate the code as today, it is more to check absence of regression with future changes, or at least detect potential impacts in predictable way. Can you please add tests to cover assignment logic? If you don't figure out how to check _bind() calls, I will add these tests by myself. |
d4eb170 to
3367a2d
Compare
|
PTAL |
rezib
left a comment
There was a problem hiding this comment.
LGTM. I will just slightly reword the code and commits messages, and update changelog before merging.
Allow retrieval of user information and user groups with service bind credentials after user successful authentication, as an alternative to using authenticated user permissions. fix rackslab#57 Co-authored-by: Rémi Palancher <remi@rackslab.io>
Co-authored-by: Rémi Palancher <remi@rackslab.io>
|
It's merged, thank you @Cornelicorn for your contribution! FYI, I plan to release 1.5.0 with this feature on friday 27/06. |
|
Just noticed, |
|
🤦 Fixed in 44982fa, thanks for letting me known. |
…entials are specified
Allow users to opt-in to the old behaviour by setting user_bind_lookups to
True, but default to binding with the specified credentials, if they are givenNeeded in order to solve rackslab/Slurm-web#587