Backend is the per-tenant uploader/downloader. One *Backend instance is bound to one access point; the actual AWS credentials are minted per-request via STS using the org UUID found in the request context.
| 59 | // bound to one access point; the actual AWS credentials are minted |
| 60 | // per-request via STS using the org UUID found in the request context. |
| 61 | type Backend struct { |
| 62 | creds *Credentials |
| 63 | |
| 64 | // stsClient is built once at construction using the pod's ambient |
| 65 | // IAM identity. The credential chain (IRSA → IMDS → env → |
| 66 | // ~/.aws/credentials) picks up the identity automatically. |
| 67 | stsClient stsAssumer |
| 68 | |
| 69 | // s3Client uses a custom CredentialsProvider that mints a scoped |
| 70 | // session per request (cached in-process per requesting-org so back- |
| 71 | // to-back uploads from the same org reuse the token). Bucket is |
| 72 | // always the AP ARN; the SDK accepts an ARN there directly. |
| 73 | s3Client *s3.Client |
| 74 | } |
| 75 | |
| 76 | var _ backend.UploaderDownloader = (*Backend)(nil) |
| 77 |
nothing calls this directly
no outgoing calls
no test coverage detected