go function failed to run with authentication enabled
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- go, kubernetes
调研方向
Start with the Function resource's pulsar.authSecret configuration and the Go function connection setup; trace how test-auth is passed to the function and how the broker authentication settings are consumed. Use the reported connection log as the failure point, and consider the issue done when the Go function connects successfully with AuthenticationToken enabled.
由索引模型根据 Issue 内容生成。
描述
Hi,
I have a pulsar cluster with auth enabled, using AuthenticationProviderToken.
authenticationEnabled: "true"
authenticationProviders: "org.apache.pulsar.broker.authentication.AuthenticationProviderToken"
However, the go function runs with this error.
go-function-sample-function-0 pulsar-function 2022/05/11 16:04:04.677 asm_amd64.s:1581: [info] [TCP connection established] remote_addr=pulsar://pulsar-broker.pulsar:6650 local_addr=172.20.11.22:51436
go-function-sample-function-0 pulsar-function 2022/05/11 16:04:04.682 connection.go:225: [warning] Failed to establish connection with broker: 'Unable to authenticate' remote_addr=pulsar://pulsar-broker.pulsar:6650 local_addr=172.20.11.22:51436
How does my go function use AuthenticationToken, provided in the test-auth secret, to connect the broker? Any examples?
Here's my config file:
apiVersion: compute.functionmesh.io/v1alpha1
kind: Function
metadata:
name: go-function-sample
namespace: default
spec:
image: lichuan33/pulsar-go-function:t1
forwardSourceMessageProperty: true
maxPendingAsyncRequests: 1000
replicas: 1
maxReplicas: 1
logTopic: persistent://public/default/go-function-logs
input:
topics:
- persistent://public/default/go-function-input-topic
output:
topic: persistent://public/default/go-function-output-topic
resources:
requests:
cpu: "0.1"
memory: 1G
limits:
cpu: "0.2"
memory: 1.1G
pulsar:
pulsarConfig: "test-go-pulsar"
authSecret: "test-auth"
golang:
go: /pulsar/examples/go-function
goLocation: ""
clusterName: pulsar
autoAck: true
---
apiVersion: v1
kind: ConfigMap
metadata:
name: test-go-pulsar
data:
webServiceURL: http://pulsar-broker.pulsar:8080
brokerServiceURL: pulsar://pulsar-broker.pulsar:6650
---
apiVersion: v1
kind: Secret
metadata:
name: test-auth
stringData:
clientAuthenticationPlugin: "org.apache.pulsar.client.impl.auth.AuthenticationToken"
clientAuthenticationParameters: "token:xxx.yyy.zzz"
Thanks.
- 主要语言
- Go
- 星标
- 228
- 派生
- 30
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 2
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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
-
kind/bug needs-triage
难度 1/5 1 小时以内 新手友好度 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
难度 2/5 1-3 小时 新手友好度 78/100
vllm-project/semantic-router#4024 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
alexgorbatchev/dotfiles#107 ·
-
难度 1/5 1 小时以内 新手友好度 84/100