Skip to content

fix: refresh credentials before replaying evidence uploads - #437

Open
tolulopedd26 wants to merge 1 commit into
ChainForgee:mainfrom
tolulopedd26:fix/evidence-upload-credential-refresh
Open

fix: refresh credentials before replaying evidence uploads#437
tolulopedd26 wants to merge 1 commit into
ChainForgee:mainfrom
tolulopedd26:fix/evidence-upload-credential-refresh

Conversation

@tolulopedd26

Copy link
Copy Markdown

Summary

The offline sync queue captured evidence upload URLs and headers verbatim, so a signed URL that expired while the device was offline would strand the upload after maxRetries.

This change adds a per-action credential-refresh hook invoked when a retry fails with a credential-expiry error (401/403). The refreshed URL and headers are persisted back into the queued action so the next retry cycle uses fresh credentials.

Closes #435

Testing

  • Verified credential-expiry errors (401/403 with expiry hint) trigger the refresh callback
  • Verified permanent 4xx errors still fail without infinite refresh
  • Verified saver-mode throttling still bounds refreshes

Checklist

  • Tests added or updated for new/changed behavior
  • Existing tests pass
  • No secrets, keys, or seed phrases committed
  • Follows the coding conventions in the relevant service README
  • PR is focused on a single concern

The offline sync queue captured evidence upload URLs and headers
verbatim, so a signed URL that expired while the device was offline
would strand the upload after maxRetries.

This change adds a per-action credential-refresh hook invoked when a
retry fails with a credential-expiry error (401/403). The refreshed
URL and headers are persisted back into the queued action so the next
retry cycle uses fresh credentials.

Closes ChainForgee#435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

offline sync replays captured evidence upload URLs and headers: expiring signed URLs strand evidence uploads forever

1 participant