How to provide secrets with authConfig
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java, kubernetes
調査の方向性
Start by tracing the Function spec entries for pulsar.authConfig, authSecret, and secretsMap, using the supplied Kubernetes YAML as the reproduction. Compare how genericAuth and the secret-backed environment variables are handled for the Java function; done means clientAuthenticationParameters and clientAuthenticationPlugin remain secret-backed while authentication succeeds.
索引モデルが issue の本文から書いたものです。
説明
Hi,
I'm trying to use authentication for a java function with the common use of Secrets to store the JWT token needed to access pulsar.
authSecret works
As I understand, the authSecret is legacy.
apiVersion: compute.functionmesh.io/v1alpha1
kind: Function
metadata:
name: test
namespace: test
spec:
className: com.test.Test
image: streamnative/pulsar-functions-java-runner:2.11.2.9
forwardSourceMessageProperty: true
maxPendingAsyncRequests: 1000
replicas: 1
maxReplicas: 3
#logTopic: persistent://test/functions.log
input:
topics:
- persistent://test/test
resources:
requests:
cpu: "100m"
memory: "1G"
limits:
cpu: "2"
memory: "2G"
pulsar:
pulsarConfig: "pulsar-config"
authSecret: "pulsar-auth"
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: test
name: pulsar-config
data:
webServiceURL: https://test:8443
brokerServiceURL: pulsar+ssl://test:6651
---
apiVersion: v1
data:
clientAuthenticationParameters: XXX # org.apache.pulsar.client.impl.auth.AuthenticationToken
clientAuthenticationPlugin: XXX # "token:eyJ..."
kind: Secret
type: Opaque
authConfig doesn't work
either combination of the approaches:
as environment variables
pulsar:
pulsarConfig: "pulsar-config"
secretsMap:
"clientAuthenticationParameters":
path: "pulsar-auth"
key: "clientAuthenticationParameters"
"clientAuthenticationPlugin":
path: "pulsar-auth"
key: "clientAuthenticationPlugin"
authConfig
pulsar:
pulsarConfig: "pulsar-config"
authConfig:
genericAuth: "pulsar-auth"
apiVersion: compute.functionmesh.io/v1alpha1
kind: Function
metadata:
name: test
namespace: test
spec:
className: com.test.Test
image: streamnative/pulsar-functions-java-runner:2.11.2.9
forwardSourceMessageProperty: true
maxPendingAsyncRequests: 1000
replicas: 1
maxReplicas: 3
#logTopic: persistent://test/functions.log
input:
topics:
- persistent://test/test
resources:
requests:
cpu: "100m"
memory: "1G"
limits:
cpu: "2"
memory: "2G"
pulsar:
pulsarConfig: "pulsar-config"
secretsMap:
"clientAuthenticationParameters":
path: "pulsar-auth"
key: "clientAuthenticationParameters"
"clientAuthenticationPlugin":
path: "pulsar-auth"
key: "clientAuthenticationPlugin"
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: test
name: pulsar-config
data:
webServiceURL: https://test:8443
brokerServiceURL: pulsar+ssl://test:6651
---
apiVersion: v1
data:
clientAuthenticationParameters: XXX # org.apache.pulsar.client.impl.auth.AuthenticationToken
clientAuthenticationPlugin: XXX # "token:eyJ..."
kind: Secret
type: Opaque
I don't want to put the Auth Token into a configmap. How is the correct approach for supplying clientAuthenticationParameters as environment variable from a secret in combination with "authConfig"?
- 主要言語
- Go
- スター
- 228
- フォーク
- 30
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
streamnative/function-mesh のほかの issue
-
streamnative/function-mesh#811 · 担当者 1 名 ·
-
難易度 2/5 半日 初心者へのやさしさ 45/100
streamnative/function-mesh#806 ·
-
streamnative/function-mesh#801 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
streamnative/function-mesh#796 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
streamnative/function-mesh#769 ·
streamnative/function-mesh の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
Bob Shell support オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
santhosh-tekuri/jsonschema#276 ·