Add SignedPolicyDocument support to storage.py and fast_http.py #5088
+65
−0
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.
Add support for generating and using GCS signed policy documents for file uploads.
This change adds:
SignedPolicyDocumentclass insrc/clusterfuzz/_internal/google_cloud_utils/storage.pyto represent the policy document.get_signed_policy_documentfunction instorage.pyto generate the document usinggenerate_signed_post_policy_v4.upload_using_signed_policy_documentfunction insrc/clusterfuzz/_internal/system/fast_http.pyto upload files using the generated policy document viaaiohttp.This functionality enables uploading testcases (or other files) directly to GCS using a signed policy, which is useful for clients that need to upload files securely without direct GCS credentials.
PR created automatically by Jules for task 8538793473027729302 started by @jonathanmetzman