docs: rework setup guide with gcloud commands and key permissions - #132
Conversation
Brings docs/connector.mdx in line with the published Google Workspace setup page so the next docs sync doesn't regress it. - Add a "Before you begin" section listing the required Google Cloud, Workspace, and C1 roles. - Add gcloud equivalents for project creation, API enablement, service account creation, key creation, key listing, and retrieving the numeric unique ID used for domain-wide delegation. - Add "Allow service account key creation", covering iam.serviceAccountKeys.create, the constraints/iam.disableServiceAccountKeyCreation org policy enforced by default for organizations created on or after May 3, 2024, and constraints/iam.serviceAccountKeyExpiryHours. - Clarify that the Admin SDK API covers Directory, Reports, and Data Transfer, so no separate Data Transfer API needs enabling. - Replace the inline scope purpose lists with read-only and read/write scope tables. - Add "Set Google Workspace as your C1 directory", covering the Directory > Directory sources flow. - Drop the Editor role grant. Access comes entirely from domain-wide delegation, so no project IAM role is required; the Service Account Key Admin role is now called out explicitly instead of being an implied side effect of Editor. - Consistency pass: fix the Cloud Identity API required/optional contradiction, correct Google Cloud steps that asked for a Workspace super admin, merge duplicate read-only-scope callouts, and fix the "What's next?" heading level. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Connector PR Review: docs: rework setup guide with gcloud commands and key permissionsBlocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0 Review SummaryThe new commit Security IssuesNone found. Correctness IssuesNone found. Suggestions
Prompt for AI agents |
Audited the setup guide against the connector source. Fixes what the code contradicts, and closes gaps a customer would hit during setup. Scopes and APIs: - The read-only scope set is not fully read-only. It includes admin.directory.user.security, which permits sign_out_user, delete_all_oauth_tokens, and delete_all_application_passwords. The page told customers to choose that set if they did not want C1 acting on their users. Now states the exception and what leaving the scope out costs. - admin.directory.user.security and admin.reports.audit.readonly are both required to sync enterprise applications. Without either, the syncer is never registered and the resource type disappears. Now documented on both scope rows. - Cloud Identity API was marked Required while the matching scope was marked Optional. The connector treats a disabled Cloud Identity API as a soft failure and falls back to display-name IDs, so the API is now Recommended, with the degradation stated. - Dropped the "incremental sync" / "continuous sync" split naming for the same scope. Actions: - privacy_levels on transfer_user_drive_files is a string list, not a string. A bare string is rejected. - who_can_post_message and message_moderation_level accept closed enums. All allowed values now listed. - Documented the updated_fields return value alongside skipped_fields, and rewrote that note for clarity. Setup and deployment: - "Before you begin" asked for project Owner or Editor immediately before the guide explains Editor is unnecessary. Replaced with the three minimal operator roles, and made explicit that these belong to the operator rather than the service account. - The Kubernetes Secret listed values under data: with an unquoted BATON_PROVISIONING: true, which kubectl rejects. Switched to stringData: per the connector doc template. Also refreshed docs-info.md: Admin SDK covers Data Transfer, the Workspace super admin is only needed for domain-wide delegation, and the setup summary now points at connector.mdx. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- update_user_profile does not return updated_fields. Its schema declares success, resource, and skipped_fields only; updated_fields is computed but logged rather than returned. Only update_user returns it. The previous wording sent automation authors after a field that never arrives. - "Each must be enabled in your project" still implied the Cloud Identity API was mandatory, contradicting the API table. Narrowed to the Admin SDK API, pointing at the table for the rest. - The Kubernetes Secret told readers to paste raw service account JSON as a bare YAML scalar, which fails to parse. Replaced with a block scalar and a skeleton of the key. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Dismissing as stale. This review was submitted against 7f004af; its four comments were addressed in 4221a46 and all six review threads are resolved. The same bot re-ran on 4221a46 and reported "No blocking issues found", but as a COMMENTED review it did not clear this CHANGES_REQUESTED state. All checks now pass, including connector-test, whose earlier failure was a Reports API quotaExceeded against the QA tenant rather than anything in this diff.
The org ruleset exempts docs/connector.mdx from connector-approvers review but not docs/docs-info.md, so four lines of internal notes were gating the customer-facing corrections behind a team approval. Nothing consumes docs-info.md: no workflow, script, or skill references it, and the published Google Workspace page does not link to it. The two corrections it carried (Admin SDK covers Data Transfer; the Workspace super admin is only needed for domain-wide delegation) are already stated correctly in connector.mdx, which is the file that publishes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Project Owner cannot create a project. The guide opens with "gcloud projects create --organization=...", which needs roles/resourcemanager.projectCreator granted at the organization or folder level, and no project-level role grants it. Split the roles bullet: project creation now calls out Project Creator and notes it is skippable when reusing an existing project; Owner is scoped to everything after the project exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
What
Reworks
docs/connector.mdxto match the reviewed and published Google Workspace setup guide. The published page was updated directly rather than through this file, so this brings the connector's copy back in sync — without it, the next release would sync the older text over the improvements.No code, capability, or config-schema changes. Documentation only.
Changes
Structure and
gcloudgcloudequivalents alongside every console procedure: project creation, API enablement, service account creation, key creation, key listing, and retrieving the numeric unique ID used for domain-wide delegation.iam.serviceAccountKeys.create, granted by the Service Account Key Admin roleconstraints/iam.disableServiceAccountKeyCreation, enforced by default for organizations created on or after May 3, 2024, with the exactFAILED_PRECONDITIONerror, thegcloud org-policies describe --effectivecheck, and the project-level exception YAMLconstraints/iam.serviceAccountKeyExpiryHours, which silently breaks a working connector once a capped key lifetime elapsesadmin.datatransferscope.Using the connector as the C1 directory
Consistency pass
What's next?heading level and ordering.Removal of the Editor role grant
The guide previously told users to grant the service account the Editor role. This drops it in favor of no project role at all.
The connector's access comes entirely from domain-wide delegation configured in the Admin console, so a Cloud IAM project role plays no part in authorizing Workspace API calls. Editor does include
iam.serviceAccountKeys.create, so anyone following the old instructions got key creation as a side effect — with Editor removed, the key admin role is now called out explicitly rather than left implied.This change was reviewed and approved on the published page; it is included here for parity.
One intentional deviation from the published page
The
admin.directory.userscope row differs:Write. Provision and deprovision accountsWrite. Provision and deprovision accounts, update user profiles and custom-schema values, and promote and demote super administratorsThe published page converted the inline scope list into a table; this file had independently expanded that purpose text to cover
update_user_profile,update_user, andmake_admin. Those actions are documented here but not yet on the published page. The table structure is taken from the published version and the longer wording preserved, so the row is accurate once the next release syncs.Verification
update_user_profile/update_user/make_adminrows and their two<Note>blocks.@mdx-js/mdx(the same compiler the docs verify workflow uses).baton_capabilities.jsonandconfig_schema.jsonuntouched.🤖 Generated with Claude Code