Skip to content

Commit 7e0ad77

Browse files
committed
support auth with both jwt and vault (#1201)
<!-- ### Contribution Checklist - Name the pull request in the form "[charts/<chart-name>] Title of the pull request". Skip *[charts/<chart-name>]* if the PR doesn't change a specific chart. E.g. `[docs] Fix typo in README`. - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review. - Each pull request should address only one issue, not mix up code from multiple issues. - Each commit in the pull request has a meaningful commit message - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below. **(The sections below can be removed for hotfixes of typos)** --> *(If this PR fixes a github issue, please add `Fixes #<xyz>`.)* Fixes #<xyz> *(or if this PR is one task of a github issue, please add `Master Issue: #<xyz>` to link to the master issue.)* Master Issue: #<xyz> ### Motivation *Explain here the context, and why you're making that change. What is the problem you're trying to solve.* ### Modifications *Describe the modifications you've done.* ### Verifying this change - [x] Make sure that the change passes the CI checks. *(Please pick either of the following options)* This change is a trivial rework / code cleanup without any test coverage. *(or)* This change is already covered by existing tests, such as *(please describe tests)*. *(or)* This change added tests and can be verified as follows: *(example:)* - *Added integration tests for end-to-end deployment with large payloads (10MB)* - *Extended integration test for recovery after broker failure* ### Documentation Check the box below. Need to update docs? - [ ] `doc-required` (If you need help on updating docs, create a doc issue) - [x] `no-need-doc` (Please explain why) - [ ] `doc` (If this PR contains doc changes) Signed-off-by: ericsyh <ericshenyuhao@outlook.com> (cherry picked from commit 5613b5f)
1 parent b7856a0 commit 7e0ad77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

charts/sn-platform/templates/_helpers.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ PULSAR_PREFIX_OIDCPublicKeyPath: file://{{ .Values.broker.publicKeyPath | defaul
218218
PULSAR_PREFIX_OIDCPublicKeyPath: "{{ template "pulsar.vault.url" . }}/v1/identity/oidc/.well-known/keys"
219219
{{- end }}
220220
{{- end }}
221-
{{- if .Values.auth.oauth.enabled }}
221+
{{- if and .Values.auth.oauth.enabled (not (or .Values.auth.vault.enabled .Values.auth.authentication.jwt.enabled)) }}
222222
PULSAR_PREFIX_oauthIssuerUrl: "{{ .Values.auth.oauth.oauthIssuerUrl }}"
223223
PULSAR_PREFIX_oauthAudience: "{{ .Values.auth.oauth.oauthAudience }}"
224224
{{- if .Values.auth.oauth.oauthAdminScope }}
@@ -239,7 +239,7 @@ brokerClientAuthenticationParameters: '{{ .Values.auth.oauth.brokerClientAuthent
239239
PULSAR_PREFIX_oauthSubjectClaim: "{{ .Values.auth.oauth.oauthSubjectClaim }}"
240240
{{- end }}
241241
{{- else }}
242-
{{- if .Values.auth.authentication.jwt.enabled }}
242+
{{- if and .Values.auth.authentication.jwt.enabled (not (or .Values.auth.oauth.enabled .Values.auth.vault.enabled))}}
243243
brokerClientAuthenticationPlugin: "org.apache.pulsar.client.impl.auth.AuthenticationToken"
244244
{{- end }}
245245
{{- end }}

0 commit comments

Comments
 (0)