Skip to content

chore: Remove dwd support#250

Merged
jpoehnelt merged 3 commits intogoogleworkspace:mainfrom
sqrrrl:dwd
Mar 6, 2026
Merged

chore: Remove dwd support#250
jpoehnelt merged 3 commits intogoogleworkspace:mainfrom
sqrrrl:dwd

Conversation

@sqrrrl
Copy link
Member

@sqrrrl sqrrrl commented Mar 6, 2026

Description

Please include a summary of the change and which issue is fixed. If adding a new feature or command, please include the output of running it with --dry-run to prove the JSON request body matches the Discovery Document schema.

Dry Run Output:

// Paste --dry-run output here if applicable

Checklist:

  • My code follows the AGENTS.md guidelines (no generated google-* crates).
  • I have run cargo fmt --all to format the code perfectly.
  • I have run cargo clippy -- -D warnings and resolved all warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have provided a Changeset file (e.g. via pnpx changeset) to document my changes.

@sqrrrl sqrrrl requested a review from jpoehnelt as a code owner March 6, 2026 03:23
@googleworkspace-bot googleworkspace-bot added area: skills area: auth area: docs area: core Core CLI parsing, commands, error handling, utilities labels Mar 6, 2026
@changeset-bot
Copy link

changeset-bot bot commented Mar 6, 2026

🦋 Changeset detected

Latest commit: 7cb404d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@googleworkspace/cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request removes all support for Domain-Wide Delegation (DWD) within the Google Workspace CLI. This change streamlines the authentication process by eliminating the GOOGLE_WORKSPACE_CLI_IMPERSONATED_USER environment variable and its associated logic, simplifying both the codebase and user documentation.

Highlights

  • Removed DWD Environment Variable: The GOOGLE_WORKSPACE_CLI_IMPERSONATED_USER environment variable and all related code for impersonation have been completely removed from the CLI.
  • Updated Authentication Logic: The core authentication functions in src/auth.rs were refactored to no longer accept or process an impersonated_user parameter, simplifying the authentication flow.
  • Documentation Clean-up: All mentions and examples of Domain-Wide Delegation have been removed from AGENTS.md, README.md, and skills/gws-calendar/SKILL.md to reflect the discontinued support.
  • Code Comment Refinements: Comments in src/auth_commands.rs and src/setup.rs were updated to remove references to DWD in the context of app-only scopes, ensuring consistency with the removal.
  • Changelog Entry Added: A new changeset file was created to document this minor release, indicating the removal of domain-wide delegation support.
Changelog
  • .changeset/remove-dwd.md
    • Added a new changeset file documenting the removal of domain-wide delegation support.
  • AGENTS.md
    • Removed the GOOGLE_WORKSPACE_CLI_IMPERSONATED_USER environment variable from the documentation.
  • README.md
    • Removed the section detailing how to configure Domain-Wide Delegation.
    • Removed the GOOGLE_WORKSPACE_CLI_IMPERSONATED_USER environment variable from the configuration table.
  • skills/gws-calendar/SKILL.md
    • Removed the note advising against using service accounts for calendar insertion and mentioning domain-wide delegation.
  • src/auth.rs
    • Removed the impersonated_user variable from the get_token function.
    • Updated calls to get_token_inner to no longer pass the impersonated_user parameter.
    • Removed the impersonated_user parameter from the get_token_inner function signature.
    • Removed the logic for checking and applying impersonation via builder.subject(user.to_string()).
  • src/auth_commands.rs
    • Updated a comment to remove "domain-wide delegation" from the description of app-only scopes.
  • src/main.rs
    • Removed the GOOGLE_WORKSPACE_CLI_IMPERSONATED_USER environment variable from the usage printout.
  • src/setup.rs
    • Updated a comment to remove "domain-wide delegation" from the description of app-only scopes.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes support for Domain-Wide Delegation (DWD). The changes are comprehensive, removing the GOOGLE_WORKSPACE_CLI_IMPERSONATED_USER environment variable, the associated logic for impersonation using service accounts, and all related documentation from the README, agent guides, and skill-specific markdown files. The code modifications in src/auth.rs correctly remove the subject() call that enabled impersonation. The overall implementation is clean and effectively achieves the goal of removing DWD support from the CLI.

@jpoehnelt jpoehnelt merged commit e1505af into googleworkspace:main Mar 6, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: auth area: core Core CLI parsing, commands, error handling, utilities area: docs area: skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants