Skip to content

fix(auth): warn when credential export is masked - #1000

Open
zhangkom wants to merge 1 commit into
googleworkspace:mainfrom
zhangkom:fix-warn-masked-auth-export-d24
Open

zhangkom wants to merge 1 commit into
googleworkspace:mainfrom
zhangkom:fix-warn-masked-auth-export-d24

Conversation

@zhangkom

Copy link
Copy Markdown

Description

When the default auth export masks credential fields, print a warning to stderr. Redirected JSON retains its existing format. The explicit unmasked mode and exports with no masked fields remain silent.

Fixes #983.

Verification

  • The new test reproduced the missing warning condition using synthetic data. The 69 auth-command tests now pass on Windows with Rust 1.99.1.
  • cargo fmt --all -- --check passed.
  • The wider Windows run reported two failures in existing application-default credential lookup tests outside this change.
  • Clippy passed with only the two pre-existing lint errors in auth.rs and helpers/script.rs disabled. A strict unmodified Clippy invocation still reports them.

AI-assisted with Codex.

@google-cla

google-cla Bot commented Nov 24, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@changeset-bot

changeset-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ae76401

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 Patch

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

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.

auth export masks secrets by default with no warning; consumers fail later with invalid_client

1 participant