MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / Backend

Struct Backend

pkg/blobmanager/s3accesspoint/backend.go:61–74  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
61type 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
76var _ backend.UploaderDownloader = (*Backend)(nil)
77

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected