nats-io / nats-box

A container with NATS utilities
Apache License 2.0
117 stars 35 forks source link

nats-sub, nats-pub using username/password instead of creds #8

Closed melkosoft closed 3 years ago

melkosoft commented 4 years ago

if nats-server is configured with username/password authorization how can we use nats-sub/nats-pub utilities? Running something like nats-pub -s nats://user:pass@nats-server:4222 mysubject returns on client side: nats: Authorization Violation on server side:

[6] 2020/07/09 23:29:43.806684 [DBG] 172.1.1.233:46388 - cid:1 - Client connection created
[6] 2020/07/09 23:29:43.807349 [ERR] 172.1.1.233:46388 - cid:1 - authentication error - User ""
[6] 2020/07/09 23:29:43.807368 [DBG] 172.1.1.233:46388 - cid:1 - Client connection closed: Authentication Failure

tested with catnats.py (https://github.com/yuce/catnats) using the same user/pass - was working fine

ripienaar commented 3 years ago

nats-sub and nats-pub is gone, instead now use the new nats utility that supports all auth mechanisms.