nats-io / nats.py

Python3 client for NATS
https://nats-io.github.io/nats.py/
Apache License 2.0
865 stars 177 forks source link

Unable to connect using Bcrypted password #518

Open Bhogster opened 9 months ago

Bhogster commented 9 months ago

Observed behavior

The code for connecting to NATS server using bcrypted credentials is

nc = await nats.connect(servers = ["nats://103:$2a$11$lDyjSYtC5uKSn2k3W2jufevGKQpfMB2CxVSgijfkXJCn7yRfAnP6e@0.0.0.0:4222"])

Server Config is

authorization: { users: [ {user: "103",password: "$2a$11$lDyjSYtC5uKSn2k3W2jufevGKQpfMB2CxVSgijfkXJCn7yRfAnP6e"} ] }

Below is the error for the same Traceback (most recent call last): File "/home/bhogster/miniconda3/lib/python3.9/site-packages/nats/aio/client.py", line 489, in connect await self._process_connect_init() File "/home/bhogster/miniconda3/lib/python3.9/site-packages/nats/aio/client.py", line 1999, in _process_connect_init raise errors.Error("nats: " + err_msg.rstrip('\r\n')) nats.errors.Error: nats: 'Authorization Violation'

Expected behavior

Successful Login

Server and client version

nats-server: v2.10.5 nats: 0.1.1

Host environment

Ubuntu

Steps to reproduce

No response

joachimvenaas commented 6 months ago

I'm having the same issue, did you get any further?