Repository navigation
fix(attachments): return the download headers with the blob access info [PC-5703] - #2031
Open
andreiancuta-uipath wants to merge 1 commit into
Open
andreiancuta-uipath wants to merge 1 commit into
andreiancuta-uipath wants to merge 1 commit into
Conversation
…fo [PC-5703] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Both blob-URI getters expose the SDK bearer token in recorded span output when authentication is required, creating a critical credential leak.
1 open issue
What changed in this PR
This PR adds download headers to attachment blob-access results so callers can authenticate requests to Orchestrator’s storage-offloading endpoint.
Changes:
- Return Orchestrator-provided headers and SDK authorization when required, for both sync and async accessors.
- Add a default-empty headers field excluded from
repr, with tests for header propagation and missing headers. - Bump
uipath-platformto version 0.3.22.
| File | Description |
|---|---|
packages/uipath-platform/uv.lock |
Updates the locked package version to 0.3.22. |
packages/uipath-platform/tests/services/test_attachments_service.py |
Tests download headers, conditional authorization, and missing-header handling. |
packages/uipath-platform/src/uipath/platform/orchestrator/_attachments_service.py |
Shares header construction between sync and async blob-access methods. |
packages/uipath-platform/src/uipath/platform/attachments/attachments.py |
Adds the documented headers field with a backward-compatible default. |
packages/uipath-platform/pyproject.toml |
Sets the package version to 0.3.22. |
Review effort: Balanced
Comment on lines
+728
to
+729
| if access.get("RequiresAuth"): | ||
| headers.update(self.auth_headers) |
|
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.




Summary
RequiresAuthwhenFeatures.Buckets.StorageOffloadRequiresAuthis on. The URI then points to Orchestrator's offloading endpoint, which accepts only a request with a session for the same tenant.headersis not inrepr, so the token does not go into logs.Headersmissing from the response gives an empty dict.Evidence
BlobFileAccessInfohas onlyid,uri,name.After:
test_blob_file_access_info_has_the_download_headers(sync and async): Orchestrator's headers are returned, andAuthorizationis added only whenRequiresAuthis true.test_blob_file_access_info_without_headerspasses.Merge Danger
Door: two-way
Blast Radius: small
headershas a default, so code that constructsBlobFileAccessInfokeeps working.🤖 Generated with Claude Code