Skip to content

Commit ad0d3b0

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 5a269ef commit ad0d3b0

2 files changed

Lines changed: 9 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: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,14 @@ 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+
{{- /* When a storage account key is set, jclouds.credential is merged in from the
181+
Secret. Otherwise the azureblob-sdk provider authenticates with the SAS token
182+
(jclouds.azureblob.sas, merged from the Secret) or the ambient Azure Workload
183+
Identity credentials injected into the pod. S3Proxy still requires
184+
jclouds.credential in every backend properties file (only filesystem-nio2,
185+
transient-nio2 and google-cloud-storage-sdk are exempt), so emit it empty. */}}
186+
{{- if not .Values.config.backends.azureblob.key.value }}
187+
jclouds.credential=
182188
{{- end }}
183189
{{- range $index, $bucket := .Values.config.backends.azureblob.bucketLocators }}
184190
s3proxy.bucket-locator.{{ add $index 1 }}={{ $bucket }}

0 commit comments

Comments
 (0)