flip_api.scripts.generate_internal_service_key

Generate the internal service key used by fl-server to authenticate with flip-api.

Both INTERNAL_SERVICE_KEY (plaintext) and INTERNAL_SERVICE_KEY_HASH (SHA-256 hex digest) are written into the environment file. On subsequent runs the script checks that the two values are in sync and skips if they are.

Usage:

make generate-internal-service-key make generate-internal-service-key ENV_FILE=.env.stag make generate-internal-service-key FORCE=1

Attributes

REPO_ROOT

Functions

main(→ None)

Generate the internal service key and update the environment file.

Module Contents

flip_api.scripts.generate_internal_service_key.REPO_ROOT
flip_api.scripts.generate_internal_service_key.main() None[source]

Generate the internal service key and update the environment file.

Raises:

SystemExit – If the env file is missing.