ats.auth serverΒΆ

The server application is configured via environment variables.

To print their default values:

$ ats-auth-server --write-config-defaults
export ATSAUTH_SERVER_LISTEN_ADDRESS=127.0.0.1
export ATSAUTH_SERVER_LISTEN_PORT=8081
export ATSAUTH_LOG_JSONFORMAT=False
export ATSAUTH_SERVER_JWT_SECRET=''
export ATSAUTH_AUTHENTICATION_INSECURE=False
export ATSAUTH_AUTHENTICATION_OS_CACERT=''
export ATSAUTH_AUTHENTICATION_OS_AUTH_URL=''
# Name of the tenant that contains users to authenticate
export ATSAUTH_AUTHENTICATION_OS_USER_TENANT_NAME=''
export ATSAUTH_DB_DSN=''

You can redirect this output to a file and source it from the shell.

Once the variables are set, the server can be run with ats-auth-server:

(auth) $ ats-auth-server
2017-01-17 16:52:44,682 - ats.auth.server.app - DEBUG    event='Set up DBMS connection pool...'
2017-01-17 16:52:44,694 - ats.auth.server.app - INFO     event="Server started at ('127.0.0.1', 8081)"

All log messages are printed to standard output. You can change the log format to JSON by setting ATSAUTH_LOG_JSONFORMAT = True.

Other options:

$ ats-auth-server -h
usage: ats-auth-server [-h] [--write-config-defaults] [--debug] [--no-debug]

optional arguments:
  -h, --help            show this help message and exit
  --write-config-defaults
                        print default configuration values
  --debug               enable debug toolbar
  --no-debug            disable debug toolbar

The debug toolbar is useful to inspect and troubleshoot requests, it is available under the path /_debugtoolbar.