Repository navigation
Move Workspace SSO members in and out of the GitHub SSO OU - #270
Merged
Merged
Conversation
Adding the Workspace SSO role moves the member's account into the GitHub SSO OU, including existingGWSUser accounts the googleworkspace provider doesn't manage. Removing the role moves the account back to the OU it came from.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes OU membership follow the Workspace SSO role in both directions, for every member.
/Model Context Protocol/GitHub SSO. This now includesexistingGWSUseraccounts, which the googleworkspace provider doesn't manage and which had to be moved by hand.How
A new dynamic resource,
WorkspaceUserOrgUnit, exists for each member with the role. It calls the Admin SDK Directory API with the service account key the googleworkspace provider already uses (googleworkspace:credentials), with theadmin.directory.userscope./Model Context Protocolas the OU to restore to.gworkspace.Usergoes back to ignoringorgUnitPathfor everyone, so there is one place that moves accounts.Effect on deploy
gws-user-ou-sambhavandgws-user-ou-den.sambhav@is already in the OU, so nothing moves.den@is moved into it unless it's already there.gws-user-sambhav.Not verified
The calls to Google haven't been run against the real API. If the service account can't get a token for the
admin.directory.userscope without impersonation, or lacks permission to update users, the deploy fails on the two new resources and nothing is moved.Verification
pulumi.runtime.serializeFunction, and the serialized copy runs a create and a delete against the fake API.npm run validate,npm testand Prettier pass locally. Typecheck runs in CI.