Repository navigation
fix(services/azblob): validate customer-provided encryption keys - #8442
Merged
Xuanwo merged 1 commit intoOct 30, 2026
Merged
Conversation
Xuanwo
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
No linked issue.
Rationale for this change
The Azblob builder checks whether
encryption_keycan be used as an HTTP header, but accepts malformed Base64 and keys with invalid lengths. Theserver_side_encryption_with_customer_keyhelper also accepts raw keys of arbitrary length. Rejecting these inputs during operator construction gives callers a configuration error before attempting a storage operation.Azure's customer-provided key contract specifies a Base64-encoded AES-256 key. This change applies that format and 32-byte length requirement at the builder boundary.
What changes are included in this PR?
ConfigInvalidwith the configuration field identified, without including the key in the error.The invalid-key regression tests fail before the implementation change and pass afterward. Validation: 16 service unit tests and 2 doctests passed; focused Clippy and rustdoc with warnings denied, Rust formatting, and Ruff checks on the generated Python configuration file passed.
Are there any user-facing changes?
Malformed or incorrectly sized customer-provided encryption keys now fail when building an operator with
ConfigInvalid. The raw-key helper retains its fluent signature; validation occurs during construction.Breaking changes
AI Usage Statement
gemma4-26b,qwen3-8b, andqwen3.8-27b, as listed in the scan metadata. Effort: not recorded. Role: identified missing key format and length validation; the metadata does not attribute individual findings to a model.