Authorization

The configurator supports Basic HTTP authorization.

Configuration

To enable login|password authorization, you need to add the LUNA_CONFIGURATOR_AUTHORIZATION section to config.conf:

[LUNA_CONFIGURATOR_AUTHORIZATION]

#: [int] flag to enable / disable authorization in the configurator
USE_AUTHORIZATION = 1
#: [string] configurator master user
LUNA_CONFIGURATOR_USER = luna
#: [string] configurator master password
LUNA_CONFIGURATOR_PASS = luna
  • USE_AUTHORIZATION: 0 if authorization is disabled, 1 if authorization is enabled

  • LUNA_CONFIGURATOR_USER: login that will be used by other services for authorization

  • LUNA_CONFIGURATOR_PASS: password that will be used by other services for authorization

Additionally, you can use environment variables that override settings from config.conf:

env "VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.USE_AUTHORIZATION=1" bash
env "VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.LUNA_CONFIGURATOR_USER=your_username" bash
env "VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.LUNA_CONFIGURATOR_PASS=your_password" bash

Where:

  • VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.USE_AUTHORIZATION=(0, 1): enables / disables the use of authorization

  • VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.LUNA_CONFIGURATOR_USER=(string): authorization login

  • VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.LUNA_CONFIGURATOR_PASS=(string): authorization password

Warning

Bash does not support using environments containing dot-type separators in variable names. Therefore, we cannot use syntax like this: export VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.USE_AUTHORIZATION=1

If you run services via docker compose you can specify environment variables in docker-compose.yml:

configurator:
    environment:
        VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.USE_AUTHORIZATION: 1
        VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.LUNA_CONFIGURATOR_USER: your_username
        VL_SETTINGS.LUNA_CONFIGURATOR_AUTHORIZATION.LUNA_CONFIGURATOR_PASS: your_password

Public endpoints

Always available without authorization.

  • /login

  • /healthcheck

  • /version

  • /metrics

  • /api/config

  • /api/docs/

Where api is the version of the used configurator API (for example: 1).