Repository navigation
Conversation
S3Proxy 4.1.2 uses application default credentials for a GCS backend with no key against Google's endpoint (gaul/s3proxy#1211), instead of sending requests unauthenticated. Document it, require 4.1.2 for a keyless config at render time, and note the storage.buckets.get permission a GET needs.
📝 README.md PreviewThe following changes to Click to expand diffdiff --git a/README.md b/README.md
index 68a2cc6..0d10fb0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# s3proxy
-  
+  
A Helm chart for deploying S3Proxy - Access other storage backends via the S3 API
@@ -18,14 +18,14 @@ A Helm chart for deploying S3Proxy - Access other storage backends via the S3 AP
## S3Proxy version compatibility
-Chart `1.x` targets **S3Proxy 4.x** (`appVersion` currently `4.1.1`; override with `image.tag`). Minimum supported version is `4.0.0`.
+Chart `1.x` targets **S3Proxy 4.x** (`appVersion` currently `4.1.2`; override with `image.tag`). Minimum supported version is `4.0.0`.
S3Proxy `4.0.0` removed Apache jclouds and, with it, the Atmos and B2 backends and the `-sdk` / `-nio2` provider-name variants. Each backend now has a single native/SDK implementation selected by its plain name — `filesystem`, `transient`, `aws-s3`, `azureblob`, `google-cloud-storage`, `openstack-swift` — so the chart no longer exposes the `aws:` / `nio2:` / `azureblob.provider` toggles.
- **`filesystem` / `transient`** — the NIO2 implementations (no toggle).
- **`s3`** — the `aws-s3` AWS SDK provider; serves AWS or any S3-compatible endpoint (set `endpoint`). Supports **keyless** auth: leave `accessKeyID`/`secretAccessKey` empty and set `s3.keyless: true` to use the AWS default credential chain (IRSA / EKS Pod Identity / EC2 instance profile).
- **`azureblob`** — the Azure SDK; supports Managed/Workload Identity via `azureblob.managedIdentity: true` (no static key) — see "Example 3b".
-- **`googleCloudStorage`** — the Google SDK; a static service-account JSON key is required (`serviceAccountKey.value` / `.existingSecret`). **Keyless GCS (Workload Identity/ADC) is not supported by S3Proxy 4.x** — an empty credential selects an unauthenticated (emulator-only) client, not ADC.
+- **`googleCloudStorage`** — the Google SDK; authenticates with a service-account JSON key (`serviceAccountKey.value` / `.existingSecret`) or, with no key, application default credentials such as GKE Workload Identity; see "Example 4b". Keyless needs S3Proxy `4.1.2` or later, since earlier releases send requests without credentials; the chart fails at render time if keyless GCS meets an older `image.tag`.
- **`openstackSwift`** — the openstack4j SDK (Keystone v3); set `projectName` and, if non-default, `projectDomainName` / `userDomainName`.
Removed in chart `1.x`: the `b2` and `rackspaceCloudfiles` backends (jclouds-only, dropped upstream). Rackspace Cloud Files is OpenStack-Swift-compatible — configure it via the `openstackSwift` backend.
@@ -248,19 +248,19 @@ The following section lists the configurable parameters of the s3proxy chart and
</tr>
<tr>
<td><code>config.backends.googleCloudStorage.endpoint</code></td>
- <td>Custom GCS endpoint (<code>jclouds.endpoint</code>), e.g. a fake-gcs-server emulator. Empty uses <code>https://storage.googleapis.com</code>. An emulator needs no <code>serviceAccountKey</code>: with no key the SDK sends unauthenticated requests.</td>
+ <td>Custom GCS endpoint (<code>jclouds.endpoint</code>). Empty uses <code>https://storage.googleapis.com</code>. Without a key, an endpoint that is not HTTPS under <code>googleapis.com</code> (e.g. a fake-gcs-server emulator) gets unauthenticated requests, while Google's regional and Private Service Connect endpoints under <code>googleapis.com</code> get application default credentials.</td>
<td><code>string</code></td>
<td><code>""</code></td>
</tr>
<tr>
<td><code>config.backends.googleCloudStorage.projectID</code></td>
- <td>GCP project ID, emitted as <code>jclouds.identity</code> (the GCS SDK store reads it as the project id). Optional: when empty the project is taken from the service-account key.</td>
+ <td>GCP project ID, emitted as <code>jclouds.identity</code> (the GCS SDK store reads it as the project id). Optional with a service-account key, which carries the project; set it for Workload Identity, where there is no key to take it from.</td>
<td><code>string</code></td>
<td><code>""</code></td>
</tr>
<tr>
<td><code>config.backends.googleCloudStorage.serviceAccountKey</code></td>
- <td>Service-account key configuration. The full JSON key is passed to the GCS SDK as <code>jclouds.credential</code> (<code>ServiceAccountCredentials.fromStream</code>). NOTE: S3Proxy 4.x does NOT support keyless GCS (Workload Identity/ADC) — an empty credential selects an unauthenticated (emulator-only) client, not ADC — so a static key is required against real GCS.</td>
+ <td>Service-account key configuration. The full JSON key is passed to the GCS SDK as <code>jclouds.credential</code> (<code>ServiceAccountCredentials.fromStream</code>). Leave it empty for keyless auth: from S3Proxy 4.1.2 the SDK then uses application default credentials, such as GKE Workload Identity (see README "Example 4b").</td>
<td><code>object</code></td>
<td><code>{"existingSecret":"","secretKey":"key.json","value":""}</code></td>
</tr>
@@ -918,8 +918,13 @@ persistence:
### Example 4: Google Cloud Storage Backend
-The GCS SDK reads the credential as a full service-account JSON key. A static key
-is required — S3Proxy 4.x does not support keyless GCS (Workload Identity/ADC).
+The GCS SDK reads the credential as a full service-account JSON key. For no key,
+see Example 4b.
+
+Either way, the identity needs `storage.buckets.get` on the bucket as well as
+object access, because S3Proxy reads the bucket's metadata on a GET: grant
+`roles/storage.legacyBucketReader` alongside `roles/storage.objectAdmin`. With
+object access alone, listing works but GETs fail with `AccessDenied`.
```yaml
# values-gcs.yaml
@@ -948,6 +953,46 @@ persistence:
enabled: false # Not needed for GCS backend
```
+### Example 4b: Google Cloud Storage with Workload Identity (no key)
+
+Leave `serviceAccountKey` empty and the GCS SDK uses application default
+credentials, which on GKE with Workload Identity come from the metadata server.
+This needs S3Proxy `4.1.2` or later.
+
+Grant the bucket roles to the Kubernetes service account as a Workload Identity
+principal:
+
+```bash
+PROJECT_NUMBER=$(gcloud projects describe my-project --format='value(projectNumber)')
+for role in roles/storage.objectAdmin roles/storage.legacyBucketReader
+do
+ gcloud storage buckets add-iam-policy-binding gs://my-bucket --role "$role" \
+ --member "principal://iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/my-project.svc.id.goog/subject/ns/my-namespace/sa/s3proxy"
+done
+```
+
+```yaml
+# values-gcs-wi.yaml
+config:
+ backends:
+ filesystem:
+ enabled: false
+ googleCloudStorage:
+ enabled: true
+ projectID: "my-project" # no key to take it from
+
+serviceAccount:
+ create: true
+ name: s3proxy # the name the IAM binding above refers to
+ # Or link a Google service account instead, after granting this Kubernetes
+ # service account roles/iam.workloadIdentityUser on it:
+ # annotations:
+ # iam.gke.io/gcp-service-account: "s3proxy@my-project.iam.gserviceaccount.com"
+
+persistence:
+ enabled: false
+```
+
### Example 5: Anonymous Access (No Authentication)
```yaml
|
📊 Helm Render Diff SummaryChart
🔍 Detailed Changes📝 Changes in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Held until S3Proxy 4.1.2 (or later) is released. The upstream fix, gaul/s3proxy#1211, is merged but not in a release yet. This sets
appVersionto4.1.2, so the kind tests fail until that image is published. If the release gets another number, onlyappVersionchanges.Before 4.1.2, a GCS backend with no key sent Google unauthenticated requests, so a static service-account key was the only way to authenticate. From 4.1.2 S3Proxy uses application default credentials when no key is given and the endpoint is Google's, which covers GKE Workload Identity. The chart already leaves
jclouds.credentialempty without a key, so the auth itself needs no template change.Changes
1.1.0,appVersion4.1.2.endpointand a semverimage.tagolder than4.1.2; that config would otherwise fail only at runtime, asAccessDenied. Same pattern as the S3 and Azure keyless checks.googleCloudStoragecompatibility notes; a new Example 4b for Workload Identity, granting the bucket roles to the Kubernetes service account as a Workload Identity principal; and a note in Example 4 that the identity needsstorage.buckets.get(roles/storage.legacyBucketReader) as well as object access, since S3Proxy reads the bucket's metadata on a GET.values.yamlcomments,NOTES.txtandoverride-values.example.yamldescribe the no-key option.Testing
helm lint; everytest-values/andci/functional/values/file renders.4.1.1andv4.1.1fails with the new message; no key on4.1.2,4.2.0andmasterrenders; an emulatorendpoint, an inline key, or a keyexistingSecreton4.1.1renders.googleapis.comendpoints, so the fake-gcs emulator cannot exercise it. The upstream change was tested end to end on GKE Autopilot with Workload Identity, using an image built from the fix.