Skip to content

Commit d96a9c3

Browse files
committed
Fix azureblob keyless auth: always emit jclouds.credential (#27)
S3Proxy requires both jclouds.identity and jclouds.credential in every backend properties file; only filesystem-nio2, transient-nio2 and google-cloud-storage-sdk are exempt from that check in Main.java. The azureblob backend defaults to the azureblob-sdk provider, which is NOT exempt, so when it authenticates via Azure Workload Identity (account set, no storage account key) the rendered properties file omitted jclouds.credential entirely and S3Proxy exited on startup with: Properties file must contain: jclouds.identity and jclouds.credential Emit an empty `jclouds.credential=` whenever no storage account key is provided. This keys off key.value alone (not key.value OR sasToken.value), which also covers the SAS-token-only path: SAS auth carries the token via jclouds.azureblob.sas but never sets jclouds.credential, so it hit the same startup failure. Verified with `helm template` for workload-identity, SAS-only, and key-based configs. Chart version bumped 0.4.0 -> 0.4.1. Fixes #27
1 parent 1e3d2d5 commit d96a9c3

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

charts/s3proxy/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.4.0
18+
version: 0.4.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/s3proxy/templates/configmap.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,17 @@ data:
177177
{{- if .Values.config.backends.azureblob.account }}
178178
jclouds.identity={{ .Values.config.backends.azureblob.account }}
179179
{{- end }}
180-
{{- if or .Values.config.backends.azureblob.key.value .Values.config.backends.azureblob.sasToken.value }}
181-
# Credentials will be merged from the secret properties file
180+
{{- if .Values.config.backends.azureblob.key.value }}
181+
# Storage account key credential will be merged from the secret properties file.
182+
{{- else }}
183+
# No storage account key supplied. The azureblob-sdk provider authenticates with
184+
# the SAS token (jclouds.azureblob.sas, merged from the secret) or, when neither a
185+
# key nor a SAS token is set, the ambient Azure Workload Identity credentials
186+
# injected into the pod. S3Proxy still requires jclouds.credential to be present in
187+
# every backend properties file (only filesystem-nio2, transient-nio2 and
188+
# google-cloud-storage-sdk are exempt), so emit it empty to pass that startup check
189+
# without providing a Shared Key.
190+
jclouds.credential=
182191
{{- end }}
183192
{{- range $index, $bucket := .Values.config.backends.azureblob.bucketLocators }}
184193
s3proxy.bucket-locator.{{ add $index 1 }}={{ $bucket }}

0 commit comments

Comments
 (0)