cyralinc / approzium

Approzium allows a cloud service to authenticate to a database without ever having access to its password
https://approzium.com
Apache License 2.0
55 stars 7 forks source link

Fix dev secrets backend file path #176

Open UpGado opened 4 years ago

UpGado commented 4 years ago

It appears that the user that builds the authenticator binaries ends up hardcoded in the path of the dev secrets backend.

To reproduce:

  1. On an EC2 instance with VAULT_ADDR unset.
  2. Run the binary:
    ubuntu@ip-172-31-62-204:~$ authenticator --disabletls
    INFO   [2020-07-30T07:28:12Z] api starting on http://127.0.0.1:6000
    INFO   [2020-07-30T07:28:12Z] loading secrets at "/Users/rebeccapetrin/go/src/github.com/cyralinc/approzium/authenticator/server/testing/secrets.yaml"
    ERROR  [2020-07-30T07:28:12Z] authenticator ended due to no valid credential manager available, see debug-level logs for more information
tyrannosaurus-becks commented 4 years ago

Hey! I think this might be fixed on the current develop branch. When I make a new authenticator by doing a fresh make dev in approzium/authenticator, it just works for me. Try $ authenticator --dev. If it's still not working for you, can you post fresh steps to reproduce it?

tyrannosaurus-becks commented 4 years ago

Here's an example of it working for me presently:

➜  Desktop authenticator --disable-tls
INFO   [2020-08-07T15:09:36-07:00] api starting on http://127.0.0.1:6000
INFO   [2020-08-07T15:09:36-07:00] loading secrets at "/Users/rebeccapetrin/go/src/github.com/cyralinc/approzium/authenticator/server/testing/secrets.yaml"
INFO   [2020-08-07T15:09:36-07:00] secrets loaded, please restart authenticator to load edits
WARNING[2020-08-07T15:09:36-07:00] local file credential manager should not be used in production
INFO   [2020-08-07T15:09:36-07:00] selected local file as credential manager
WARNING[2020-08-07T15:09:36-07:00] local file credential manager should not be used in production
INFO   [2020-08-07T15:09:36-07:00] grpc starting on http://127.0.0.1:6001
INFO   [2020-08-07T15:09:36-07:00] all ports up and ready to serve traffic