Skip to content

fix(storage): add env var to allow disabling bound token#13236

Merged
tritone merged 2 commits intogoogleapis:mainfrom
rockspore:bound-token-env-var
Oct 30, 2025
Merged

fix(storage): add env var to allow disabling bound token#13236
tritone merged 2 commits intogoogleapis:mainfrom
rockspore:bound-token-env-var

Conversation

@rockspore
Copy link
Copy Markdown
Contributor

@rockspore rockspore commented Oct 27, 2025

Inspired by #13153.

The token issuing side is still behind so hopefully it's not too late to add this knob out of extra caution. Users will be able to use it to turn off this flow if anything goes wrong.

@tritone Sorry for not doing this sooner. Would you mind taking a look?

@rockspore rockspore requested review from a team October 27, 2025 16:45
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label Oct 27, 2025
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @rockspore, 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 enhances the flexibility of the storage gRPC client by allowing the disabling of hard-bound tokens for ALTS via an environment variable. This change provides an escape hatch for scenarios where bound tokens might interfere with specific deployment environments or configurations, ensuring broader compatibility without removing the default security feature.

Highlights

  • Conditional Bound Token Usage: Introduced an environment variable, GCS_DISABLE_DIRECTPATH_BOUND_TOKEN, to conditionally disable the internaloption.AllowHardBoundTokens("ALTS") setting within the gRPC client options for storage.
  • Environment Variable Control: The presence and boolean value of GCS_DISABLE_DIRECTPATH_BOUND_TOKEN will now determine whether hard-bound tokens are enabled for ALTS, providing greater control over client configuration.
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 Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@rockspore rockspore force-pushed the bound-token-env-var branch from ffbf22a to ae7c179 Compare October 27, 2025 16:46
@rockspore rockspore changed the title [fix](storage): add env var to allow disabling bound token fix(storage): add env var to allow disabling bound token Oct 27, 2025
@rockspore rockspore force-pushed the bound-token-env-var branch from ae7c179 to 1e67c5f Compare October 27, 2025 16:47
Copy link
Copy Markdown
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 introduces an environment variable GCS_DISABLE_DIRECTPATH_BOUND_TOKEN to allow disabling bound tokens for DirectPath. The implementation is straightforward, but I've suggested an improvement to handle potential user errors by logging a warning for invalid boolean values. This will improve debuggability for users of this feature.

@rockspore rockspore requested a review from tritone October 27, 2025 18:08
@tritone tritone merged commit cdaf6a6 into googleapis:main Oct 30, 2025
9 checks passed
@rockspore rockspore deleted the bound-token-env-var branch October 30, 2025 18:06
cpriti-os added a commit that referenced this pull request Nov 14, 2025
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.6.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-go@sha256:718167d5c23ed389b41f617b3a00ac839bdd938a6bd2d48ae0c2f1fa51ab1c3d
<details><summary>storage: 1.57.2</summary>

##
[1.57.2](storage/v1.57.1...storage/v1.57.2)
(2025-11-14)

### Features

### Bug Fixes

* Handle redirect on takeover. (#13354)
([b0f1362](b0f13626))

* add env var to allow disabling bound token (#13236)
([cdaf6a6](cdaf6a6d))

### Documentation

* updates to docs and docs formatting (PiperOrigin-RevId: 828488192)
([93ca68d](93ca68d5))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants