【问题标题】:How to pass token to NATS server using nats-pub.py script如何使用 nats-pub.py 脚本将令牌传递给 NATS 服务器
【发布时间】:2021-11-19 17:48:03
【问题描述】:

我是 NATS 的新手。
请您提供如何使用 nats-pub.py 脚本将令牌传递给 NATS 服务器。
python /tmp/nats-pub.py --creds ? -s nats://eventbus-default-stan-svc:4222 {label} -d '{json}'
我可以获得NATS访问配置

"config": {
    "nats": {
        "accessSecret": {
            "key": "client-auth",
            "name": "eventbus-default-client"
        },
        "auth": "token",
        "clusterID": "eventbus-default",
        "url": "nats://eventbus-default-stan-svc:4222"
    }
}

如何配置请求以通过授权,因为现在我得到Error: nats: 'Authorization Violation'.

【问题讨论】:

    标签: nats.io argo-workflows nats-streaming-server


    【解决方案1】:

    这在当前版本的 nats-pub.py 中是不可能的,因为那里没有实现。我已经提交了nats-pub.py 的新版本。有实现 --token 开关。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-16
      相关资源
      最近更新 更多