From eebed2ba86972bf0e88ad4ba1cc039adc5c80385 Mon Sep 17 00:00:00 2001 From: ericsyh Date: Wed, 8 Jan 2025 21:32:03 +0800 Subject: [PATCH] support auth with both jwt and vault Signed-off-by: ericsyh --- charts/sn-platform/templates/_helpers.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/sn-platform/templates/_helpers.tpl b/charts/sn-platform/templates/_helpers.tpl index ecb16b67..1010fb1f 100644 --- a/charts/sn-platform/templates/_helpers.tpl +++ b/charts/sn-platform/templates/_helpers.tpl @@ -218,7 +218,7 @@ PULSAR_PREFIX_OIDCPublicKeyPath: file://{{ .Values.broker.publicKeyPath | defaul PULSAR_PREFIX_OIDCPublicKeyPath: "{{ template "pulsar.vault.url" . }}/v1/identity/oidc/.well-known/keys" {{- end }} {{- end }} -{{- if .Values.auth.oauth.enabled }} +{{- if and .Values.auth.oauth.enabled (not (or .Values.auth.vault.enabled .Values.auth.authentication.jwt.enabled)) }} PULSAR_PREFIX_oauthIssuerUrl: "{{ .Values.auth.oauth.oauthIssuerUrl }}" PULSAR_PREFIX_oauthAudience: "{{ .Values.auth.oauth.oauthAudience }}" {{- if .Values.auth.oauth.oauthAdminScope }} @@ -239,7 +239,7 @@ brokerClientAuthenticationParameters: '{{ .Values.auth.oauth.brokerClientAuthent PULSAR_PREFIX_oauthSubjectClaim: "{{ .Values.auth.oauth.oauthSubjectClaim }}" {{- end }} {{- else }} -{{- if .Values.auth.authentication.jwt.enabled }} +{{- if and .Values.auth.authentication.jwt.enabled (not (or .Values.auth.oauth.enabled .Values.auth.vault.enabled))}} brokerClientAuthenticationPlugin: "org.apache.pulsar.client.impl.auth.AuthenticationToken" {{- end }} {{- end }}