nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
15.44k stars 1.38k forks source link

Environment variable for leaf remote credentials #5658

Open peterfication opened 1 month ago

peterfication commented 1 month ago

Proposed change

Right now, the credentials for the leaf remote config need to be provided via a credentials file. The proposal is to allow leaf remote authorization to be fully done via environment variables. For example in case of the credentials file, there could be two config values that can then be filled with variables or environment variables: nkey_seed and jwt.

Use case

I have an environment where I can run Docker images but I can only configure it via environment variables. Volume mounts are not possible. Hence, I need to fully configure my NATS leaf node via variables.

Contribution

No response

peterfication commented 1 month ago

This is the part of the configuration I'm referring to: https://docs.nats.io/running-a-nats-service/configuration/leafnodes/leafnode_conf#leafnode-remotes-entry-block