<#1339 fix: redact signed-URL credentials from upl...
# flyte-github
a
#1339 fix: redact signed-URL credentials from upload error messages (FLYTE-SDK-6R) Pull request opened by EngHabu The non-retryable-error branch of
_upload_with_retry
embedded the full pre-signed object-store URL in the
RuntimeSystemError
message:
Copy code
Failed to upload /tmp/.../fast48d4...tar.gz to https://...s3.us-west-2.amazonaws.com/...?X-Amz-Algorithm=...&X-Amz-Credential=ASIA...&X-Amz-Security-Token=IQoJb3JpZ2luX2Vj...
That query string is the part that makes a pre-signed URL usable —
X-Amz-Signature
,
X-Amz-Credential
, and for STS-issued upload locations a complete
X-Amz-Security-Token
. So every failed bundle/spec upload leaked short-lived credentials into local logs and into Sentry crash reports. Fix: keep scheme/host/path (the diagnostic part — it identifies the bucket and key the PUT targeted) and replace the query string with
?<redacted>
. Side benefit: the signature and expiry differ on every attempt, so the un-redacted message gave each failure a unique Sentry fingerprint. Redacting collapses these into a single groupable issue. Tests: unit coverage for
_redact_signed_url
plus a regression test asserting the token/signature never appear in the raised message. fixes FLYTE-SDK-6R flyteorg/flyte-sdk