Fixes and optimizations for Entra ID#28938
Conversation
…ra-id # Conflicts: # server/datastore/mysql/scim_test.go
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28938 +/- ##
==========================================
- Coverage 64.19% 64.17% -0.02%
==========================================
Files 1818 1819 +1
Lines 176325 176425 +100
Branches 5126 5126
==========================================
+ Hits 113188 113228 +40
- Misses 54244 54296 +52
- Partials 8893 8901 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gillespi314
left a comment
There was a problem hiding this comment.
LGTM, just a few clarifying questions/comments
| return concreteType, nil | ||
| } | ||
|
|
||
| func getConcreteBoolType(u *UserHandler, v interface{}, name string) (bool, error) { |
There was a problem hiding this comment.
Is there another code comment somewhere to explain how/why this is being used (i.e. the MS boolean-as-string encoding issue that you mentioned in standup)? If not, would you mind adding something with a link to any supporting documentation for future reference?
There was a problem hiding this comment.
This was actually an attempt to fix the Microsoft issue that didn't work. It didn't work since there is additional validation in the base SCIM library we are using. So, I'll back out this specific change for readability/maintainability.
| // Step 1: Create a temporary table to store the rows we want to keep | ||
| // (for each host_id, keep only the row with the smallest scim_user_id) |
There was a problem hiding this comment.
Is there any particular reason to prefer the earlier (smaller) user id over others or is it just an arbitrary selection?
There was a problem hiding this comment.
Arbitrary selection, based on what Martin did in his recent IdP variables story.
…ra-id-tweaks # Conflicts: # ee/server/integrationtest/scim/scim_test.go # ee/server/scim/groups.go # ee/server/scim/users.go # server/datastore/mysql/scim.go # server/datastore/mysql/scim_test.go # server/fleet/scim.go
For #28196
This PR depends on PR #28832
This PR adds support for excludeAttributes=members, which is being used by Microsoft Entra ID.
This PR modifies the primary key of host_scim_user table to be host_id. This should have been done initially and has added accidental complexity and maintainability challenges, so we are doing it now. This means a host can have a maximum of 1 SCIM user associated with it. A SCIM user, on the other hand, can be associated with multiple hosts.
Checklist for submitter
changes/,orbit/changes/oree/fleetd-chrome/changes.COLLATE utf8mb4_unicode_ci).