MISP icon indicating copy to clipboard operation
MISP copied to clipboard

Bug: AadAuth with Group Auth enabled fails if MISP group not in first 100 groups

Open ntnco opened this issue 3 years ago • 1 comments

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_siteadmin and assign it to your user.
  • Enable AadAuth by following the documentation.
  • Try to login with AzureAD button 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

ntnco avatar Jul 29 '22 14:07 ntnco

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

ntnco avatar Jul 29 '22 14:07 ntnco

thanks for the fix, https://github.com/MISP/MISP/pull/8552 was merged.

righel avatar Sep 27 '22 09:09 righel