Skip to content

Stop logging OAuth bearer tokens - #86

Open
sai5880 wants to merge 3 commits into
google:mainfrom
sai5880:fix/no-token-logging-83
Open

sai5880 wants to merge 3 commits into
google:mainfrom
sai5880:fix/no-token-logging-83

Conversation

@sai5880

@sai5880 sai5880 commented Oct 21, 2026

Copy link
Copy Markdown

Summary

Stops the CBCM PowerShell samples from writing the raw OAuth access token to the plaintext log file next to the script. The token is still acquired and used exactly as before; only the log message changed.

Changes

  • Windows/PowerShell/cbcm/UnenrollBrowser.ps1: log OAuth token acquired. instead of the token value.
  • Windows/PowerShell/cbcm/MoveEnrolledBrowserByWindowsOSName.ps1: log OAuth token acquired. instead of the token value.
  • Windows/PowerShell/cbcm/cbcm_get_token_with_json_file.ps1: log OAuth token acquired. instead of the token value.

Token acquisition, scopes, and API calls are unchanged. The rest of the log format and the Copy-WriteToLog helper are unchanged.

Validation

  • git diff --check reports no whitespace errors.
  • Searched all three scripts for The token is, token interpolation inside -logString, and Bearer inside -logString: no matches remain.
  • Reviewed every Copy-WriteToLog call in the three scripts. The remaining log messages cover NuGet version, device ID, response text, exception messages, and registry token deletion status (no token values).
  • No other secret or token value is logged in these scripts.

Fixes

Fixes #83

@google-cla

google-cla Bot commented Oct 21, 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.

@sai5880

sai5880 commented Oct 21, 2026

Copy link
Copy Markdown
Author

I have signed the Google Individual CLA under dev.sai5880@gmail.com. Please recheck.

@sai5880

sai5880 commented Oct 21, 2026

Copy link
Copy Markdown
Author

CLA check is now green.

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.

CBCM scripts log admin OAuth bearer tokens in plaintext

1 participant