How to safely use username and password in endpoint.yml

I’m trying to setup authentication for the database we use for the tracker store, but have run into a snag. Looking at rasa interactive --endpoints, it seems that while it supports database authentication:

tracker_store:
   type: mongodb
   url: "localhost"  # (optional) host of the sql db, e.g. "localhost"
   db: "chatbot"  # path to your db
   username: "user1"  # username used for authentication
   password: "password1"  # password used for authentication

it appears that the username and password are in plaintext in the yml. Is there anyway for me to setup the yml file or setup the --endpoints option to allow me to pass in the username and password as arguments? If there is, that would allow me to safely use the yml with database authentication.

Hi Steven,

you can use environment variables in there like this ${MONGODB_USERNAME}.

Good luck, Nikola

1 Like