Repository navigation
fix(common,op): the download_web spans of RemoteStorage record the source URL with no credentials - #3713
Draft
minimal-foundry[bot] wants to merge 1 commit into
Conversation
The download_web_with_verification_and_caching and download_web_placed spans recorded the raw URL, with its credentials, signed query and fragment. They now skip the argument and record the URL from one shared stripped_url, which op::specs now calls.
Contributor
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
This branch has not been deployed
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.
Follow-up
Fixes #2817
crates/common/src/remote_storage.rscrates/common/src/lib.rscrates/op/src/specs.rsTask marker
Proof
A subscriber that records span fields now shows https://127.0.0.1:/pkg.tar.gz as the url field of both the download_web_with_verification_and_caching span and the download_web_placed span, for a source URL with user:hunter2@, a signed X-Goog-Signature query and a fragment. The password, the token, the query key and the fragment are in no span field.
Notes from the agent: The test uses a small recording tracing::Subscriber written in the test module, because common has no tracing-subscriber dev-dependency and Cargo.toml is not in the layers. The span url field is an Option. It is empty when the text is not a URL. RemoteStorage's other #[tracing::instrument] spans (for example download_with_verification_and_caching) are not changed, because they take a bucket and an object, not a URL. op::specs::stripped_url now calls common::stripped_url. I did not run op's existing stripped_url test, but cargo clippy -p common -p op --all-targets is clean.
Tests
cargo test -p common download_web_spans_record_a_stripped_urlVerify
min task run agent-verifyexited 100, so this PR is a draft.