Notakey Authentication Server - device API backend and management
1.4K
This is the main service for Notakey solution on-premise deployment. This container communicates with devices and API consumers (web authentication plugins, RADIUS proxy) and provides UI for key exchange and management.
This container provides a plain HTTP interface on port 5000, that has to be published using reverse proxy of your choice. The underlying framework expects the following headers to be set by reverse proxy.
| Header | Description |
|---|---|
| X-Forwarded-For | Remote host IP |
| X-Forwarded-Proto | should be always https |
| X-Forwarded-Host | HTTP host |
| X-Forwarded-Port | HTTP external port |
# start reverse proxy
docker run -d \
-p 443:443 \
-p 8080:8080 \
-v $PWD/traefik.yml:/etc/traefik/traefik.yml \
-v /var/run/docker.sock:/var/run/docker.sock \
traefik:latest
# start consul
docker run -d \
--name consul \
-e CONSUL_LOCAL_CONFIG='{}' \
-v devdata:/consul/data \
-v devconfig:/consul/config \
-p 8500:8500 \
consul:latest \
agent \
-server \
-node=devroot \
-advertise=127.0.0.1 \
-ui \
-client=0.0.0.0 \
-bind=0.0.0.0 \
-bootstrap-expect=1
# start auth server
docker run -d \
--name my-auth-server \
-e CLUSTER_BACKEND=http://172.17.0.1:8500/my-auth-server
-e SECRET_KEY_BASE=820e823802e0de141cdcf735b047323d937bc5bad785600c5e310beab63654b3846bfa8f93a5be91ecc64030561cc81cab06f66865536ad4b2918a74e246beb9 \
notakey/auth-server:latest
Please see Consul and Traefik documentation for configuration details.
Administration and API integration manual is available on documentation.notakey.com.
Container configuration is done using ENV variables and docker secrets. Commonly used configuration parameters are described below.
Required
This is the encryption key for management sessions.
SECRET_KEY_BASE=820e823802e0de141cdcf735b047323d937bc5bad785600c5e310beab63654b3846bfa8f93a5be91ecc64030561cc81cab06f66865536ad4b2918a74e246beb9
Required
Path to file containing SECRET_KEY_BASE value, for use with docker secrets.
SECRET_KEY_BASE_FILE=/var/secret/SECRET_KEY_BASE
Required
This is the URL where all persistence state (keys, users, services) will be stored. This needs to point to a Consul instance. The form should be:
CLUSTER_BACKEND=http://consul-host:8500/application-name
Where 8500 is the Consul client port, and "application-name" is the root folder in Consul's KV store, where all data should be stored.
Optional
This is the URL where all persistence state (keys, users, services) will be stored if REDIS is used for persistence(USE_REDIS=1). The form should be:
REDIS_BACKEND=redis://redis-host:6379/application-name
Optional
When set to 1 (USE_REDIS=1) enables persistence storage in REDIS server provided by REDIS_BACKEND. Disabled by default.
USE_REDIS=1
Optional
This is the URL for distributed cache storage. If deploying service with multiple instances, e.g. in docker swarm or k8s this value must be set. The form should be:
REDIS_URL=redis://redis-host:8500/application-name
Optional
This should point to the Notakey Messenger service API (without version). Defaults to https://messenger.notakey.com/api. Set to "off" to disable push notifications.
Optional
Service logging level (debug, info (default), error ...) for logs sent to container stdout.
LOG_LEVEL=info
Optional
Timezone for container (affects logging timestamps and DST changes). Defaults to UTC.
TZ=Europe/Riga
This is the external management port on reverse proxy that is serving authentication server management UI. Defaults to 443 - management is provided togather with device and consumer API. Compared to value provided in X-Forwarded-Port set by reverse proxy.
MGMT_PORT=8443
Optional
External DNS domain name that is used by end users (this is no service domain). Typically this is the same value as for X-Forwarded-Host header for non-management HTTP requests.
SERVICE_FQDN=ntk.mydomain.net
Optional
Internal container port to provide HTTP service. Defaults to 5000.
PORT=3000
Optional
Attempt to complete phone numbers to get international format by adding this prefix for sending onboarding SMS messages, if number is incomplete.
PHONE_COUNTRY_CODE=371
Optional
Number of days to store signed auth requests.
AUTH_REQUEST_STORAGE_DAYS=10
Optional
Number of days to store authentication activity history.
AUTH_LOG_STORAGE_DAYS=60
Optional
Number of days to store onboarding activity history.
ONBOARDING_LOG_STORAGE_DAYS=90
Optional
Time-to-live in seconds for API access tokens, defaults to 2h.
ACCESS_TOKEN_TTL=7200
Optional
Syslog server IP address for request and technical logs.
LOG_SYSLOG=192.168.4.100
Optional
Syslog minimal log severity, as integer, see: log severity levels
SYSLOG_LEVEL=3
Optional
Time-to-live in seconds for application cache, defaults to 1h.
RAILS_CACHE_TTL=3600
Content type
Image
Digest
sha256:b25c53d11…
Size
246.9 MB
Last updated
3 months ago
docker pull notakey/auth-server