Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support Entra guest user groups #310

Merged
merged 2 commits into from
Jun 27, 2024
Merged

feat: support Entra guest user groups #310

merged 2 commits into from
Jun 27, 2024

Conversation

voneiden
Copy link
Contributor

@voneiden voneiden commented May 24, 2024

Entra guest users have limited visibility into groups via the API. Basically they can only see the group id's they belong to. Both displayName and securityEnabled values are null. However filtering in the request using $filter=securityEnabled eq true still works for guest users. This feature allows returning group UUIDs for guest users.

Refs: HP-2434

@voneiden voneiden requested a review from a team May 24, 2024 10:18
@charn
Copy link
Contributor

charn commented Jun 25, 2024

Refactored the Microsoft API calls into an "advanced query" which allows filtering with securityEnabled.

Filtering groups by the securityEnabled flag requires using an "advanced query", which requires adding $count=true query parameter and a ConsistencyLevel: eventual HTTP header. 🤷

@charn charn requested a review from a team June 25, 2024 13:43
@charn charn force-pushed the entra-guest branch 2 times, most recently from 84871fa to 714fad1 Compare June 27, 2024 07:43
@charn
Copy link
Contributor

charn commented Jun 27, 2024

Since security enabled groups are now filtered by Microsoft API we can also fix TestADGroupsFromGraphResponse accordingly.

tuomas777
tuomas777 previously approved these changes Jun 27, 2024
Copy link
Contributor

@tuomas777 tuomas777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 🫏

Entra guest users have limited visibility into groups via the API.
Basically they can only see the group id's they belong to. Both
displayName and securityEnabled values are null. However filtering
in the request using ``$filter=securityEnabled eq true` still works
for guest users. This feature allows returning group UUIDs for guest
users.

Filtering groups by the `securityEnabled` flag requires using an
"advanced query", which requires adding `$count=true` query
parameter and a `ConsistencyLevel: eventual` HTTP header.

Since security enabled groups are now filtered by Microsoft API
we can also fix `TestADGroupsFromGraphResponse` accordingly.

Refs: HP-2434
Also:
- update GitHub Action versions
- Use codecov action
- Cache pip with setup-python action
Copy link

sonarcloud bot commented Jun 27, 2024

Copy link

codecov bot commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.35%. Comparing base (52202e6) to head (1d53e01).
Report is 8 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #310      +/-   ##
===========================================
+ Coverage    80.29%   80.35%   +0.06%     
===========================================
  Files           91       91              
  Lines         3775     3787      +12     
===========================================
+ Hits          3031     3043      +12     
  Misses         744      744              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@charn charn merged commit 0c5d168 into develop Jun 27, 2024
5 checks passed
@charn charn deleted the entra-guest branch June 27, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants