nats-io / nack

NATS Controllers for Kubernetes (NACK)
Apache License 2.0
155 stars 61 forks source link

Extend Nats auth to allow User Password option #76

Closed anthonycorbacho closed 2 years ago

anthonycorbacho commented 2 years ago

Hi,

I would like to know if it make sense to also allow passing User and Password as part of the auth option? Currently only NKey file is allowed.

hhk7734 commented 2 years ago

Try the below config

jetstream:
  nats:
     url: nats://<user>:<password>@<domain>:<port>
anthonycorbacho commented 2 years ago

yeah, this is what I am doing for now, but because I am using customize, I am forced to inject the credential to avoid a leak in the repo.

Thanks @hhk7734 for the feedback 👍

praveenperera commented 6 months ago

@hhk7734 will this automatically interpolate env variables so if do

nats://$USERNAME:$PASSWORD@nats.local

Will it take $USERNAME and $PASSWORD from the environment variables? Doing this would let me use secrets to manage this.

hhk7734 commented 6 months ago

@praveenperera

I'm not sure about that.

I also have a case where I used argocd, but I used account.jetstream.nats.io instead of secret.