Skip to content

fix(storage): make EncryptionKey stream output consistent with CreateHmacKeyResponse - #16707

Merged
kalragauri merged 3 commits into
googleapis:mainfrom
kalragauri:fix/encr-key
Dec 1, 2026
Merged

kalragauri merged 3 commits into
googleapis:mainfrom
kalragauri:fix/encr-key

Conversation

@kalragauri

@kalragauri kalragauri commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

The operator<< overloads for EncryptionKey and SourceEncryptionKey now print [censored] for the key value, the same placeholder CreateHmacKeyResponse uses. The algorithm and SHA-256 fields are still printed, and requests sent to the service are unchanged.

Existing tests that checked the stream output are updated, and new tests cover the output of requests that set these options.

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Nov 25, 2026

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

Copy link
Copy Markdown

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 updates the operator<< overloads for EncryptionKey and SourceEncryptionKey in well_known_headers.cc to censor the actual key values by printing [censored] instead of the raw key. It also updates existing unit tests and adds several new integration and unit tests across multiple test files (including connection_impl_file_upload_test.cc, connection_impl_object_test.cc, logging_stub_test.cc, object_requests_test.cc, tracing_connection_test.cc, and well_known_headers_test.cc) to verify that the encryption keys are correctly redacted in error statuses, logging stubs, tracing spans, and formatted headers. There are no review comments to address.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.82%. Comparing base (67bc3a0) to head (7820f43).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16707      +/-   ##
==========================================
+ Coverage   92.80%   92.82%   +0.01%     
==========================================
  Files        2279     2279              
  Lines      229093   229442     +349     
==========================================
+ Hits       212620   212977     +357     
+ Misses      16473    16465       -8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kalragauri
kalragauri marked this pull request as ready for review November 25, 2026 06:07
@kalragauri
kalragauri requested review from a team as code owners November 25, 2026 06:07
@kalragauri
kalragauri enabled auto-merge (squash) December 1, 2026 04:48
@kalragauri
kalragauri merged commit 4dfc41b into googleapis:main Dec 1, 2026
68 checks passed
@kalragauri
kalragauri deleted the fix/encr-key branch December 1, 2026 05:37
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