mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-06 07:03:45 +09:00
Tenants read every user's S3 keys in plain text from the per-user credentials Secret, and the only way to rotate them was to delete the BucketAccess and force two Helm upgrades. The chart now renders a CredentialTemplate per tenant user that names the BucketAccess, in the plaintext format, instead of rendering the BucketAccess itself, so cozystack-controller owns the grant, a mint re-creates it and a revoke deletes it; the keys are shown once, by the mint. The per-user Secret of a tenant user keeps only the endpoint and bucket name. It is rendered as data rather than stringData: Helm's three-way merge removes a live key only when the previous manifest named it, and a stringData key never shows up in data, so a key the chart stops emitting would otherwise stay. A tenant user's BucketAccess keeps the name the chart gave it, which the conversion hands over by name; a user name that is not a valid object name never had one and takes the account name instead. A user whose account name is longer than 63 characters is refused at render, as credentials-migrate refuses it. A user marked platform, which backupstrategy-controller now sets on the backup bucket's system user, keeps its chart-rendered BucketAccess and its keys in a Secret no tenant role selects or grants, so default backups keep reading it; its keys are never minted. Clearing the flag drops that BucketAccess, which revokes those keys, and the user becomes a normal account whose keys are minted. values.yaml documents both. BREAKING CHANGE: clients that read accessKey and secretKey from <bucket>-<user>-credentials must mint the user's credential instead; every mint rotates both keys. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
S3 bucket
Parameters
Parameters
| Name | Description | Type | Value |
|---|---|---|---|
locking |
Provisions bucket from the -lock BucketClass (with object lock enabled). |
bool |
false |
lockingDefaultRetention |
With locking, keeps the default retention of the -lock BucketClass (COMPLIANCE, 365 days). Set to false to provision from the -lock-noretention BucketClass instead: Object Lock is enabled with no default retention, and retention is then set on the bucket or per object through the S3 API. Read at creation only. |
bool |
true |
storagePool |
Selects a specific BucketClass by storage pool name. | string |
"" |
ui |
Deploys the web UI (s3manager) with its Service and its Ingress or HTTPRoute at <bucket>.<tenant host>. Set to false to run the bucket without them. |
bool |
true |
publicRead |
Serves the bucket's objects to anyone without credentials at <endpoint>/<bucket>/<key>. Anonymous callers can read objects but cannot list the bucket or write to it. |
bool |
false |
users |
Users configuration map. | map[string]object |
{} |
users[name].readonly |
Whether the user has read-only access. | bool |
false |
users[name].platform |
Marks a platform account, such as the system user of the backup bucket, which backupstrategy-controller sets. Its keys stay in the <bucket>-<user>-credentials Secret, which no tenant can read, and are never minted. Clearing it drops the chart-rendered BucketAccess, which revokes those keys, and the user becomes a normal account whose keys are minted through its Credential. Leave it unset for your own users. |
bool |
false |
schedulingClass |
Name of a SchedulingClass CR (cluster-scoped, group cozystack.io) used in place of the tenant's for this application's pods. A pod gets its class when it is created, so running pods keep theirs until they are recreated. Must be the tenant's own class or one listed in the tenant's allowedSchedulingClasses. Setting any other value is refused, and the pods of an application whose class is not, or no longer, in that list get the tenant's class. Empty means inherit from the tenant. |
string |
"" |