Note: any service that provides the header api-key with a value matching one of the values in this list will have access to the /policies endpoint of the service, and can receive full jwt tokens.
Example
For the API key, list: 123,my-special-key,super-secret-key,pub-keyandJWT_API_KEY set to the value of:
Any service that provides the header api-key with a value matching one of the following will have access:
123
my-special-key
super-secret-key
pub-key
Redis
The gm-jwt-security services creates and writes jwt tokens to a Redis server. In order to successfully generate and store jwt tokens, a Redis client must be implemented to connect to a server using information from the following environment variables.
Variable
Default Value
Description
Type
REDIS_HOST
"0.0.0.0"
host name of Redis server
string
REDIS_PORT
"6379"
port number of Redis server
string
REDIS_DB
0
Redis database to be selected after connecting to the server
uint
REDIS_PASS
"123"
password for Redis server
string
Optional Configuration
The following environment variables can be set to specify the host, ports, and logging capabilities of the gm-jwt-service. To specify an expiration time for generated tokens, set TOKEN_EXP_TIME.
Variable
Default Value
Description
Type
BIND_ADDRESS
"0.0.0.0"
bind address for the gm-jwt-security server
string
HTTP_PORT
8080
http port for the server
uint
HTTPS_PORT
9443
https port for the server
uint
ZEROLOG_LEVEL
"WARN"
logging level: INFO, DEBUG, WARN, ERR
string
TOKEN_EXP_TIME
28800
token expiration time in seconds
uint
DEFAULT_PATH
"/services/"
default path to apply to cookies generated by the /policies endpoint
string
Configure LDAP
The gm-jwt-security service supports LDAP as a backend server to search for user payloads.
Note: if LDAP is configured, it will take precedence over the users.json file. If LDAP is not configured, the configured USERS_JSON file will be searched for user payloads.
Configure TLS
TLS can be configured on the gm-jwt-security service using TLS Configuration.
Logging
The log level set by the ZEROLOG_LEVEL variable can be retrieved and dynamically changed via the following requests:
GET /logging
Returns the current log level.
PUT /logging?level=<log-level>
Updates the log level to the level indicated in query parameter level.