MISP
MISP copied to clipboard
Bug: AadAuth with Group Auth enabled fails if MISP group not in first 100 groups
Expected behavior
User gets authenticated
Actual behavior
User does not get authenticated
Steps to reproduce
- Create at least 100 Azure AD groups.
- Add another group for
misp_siteadminand assign it to your user. - Enable AadAuth by following the documentation.
- Try to login with
AzureADbutton and observe that it fails.
Version
2.4.159
Operating System
Ubuntu
Operating System version
20.04
PHP version
7.4.3
Browser
No response
Browser version
No response
Relevant log output
No response
Extra attachments
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Thanks to @righel 's logging improvements, I was able to pinpoint that the 100+ groups were causing the bug, because MS Graph's results are paginated.
I was able to fix the bug by implementing a simple while loop. I will submit a PR
thanks for the fix, https://github.com/MISP/MISP/pull/8552 was merged.