Command-line interface

gafaelfawr

Administrative command-line interface for gafaelfawr.

gafaelfawr [OPTIONS] COMMAND [ARGS]...

Options

--version

Show the version and exit.

audit

Check data stores for consistency.

Any problems found will be reported to Slack.

gafaelfawr audit [OPTIONS]

Options

--fix

Fix issues found, if possible

--config-path <config_path>

Application configuration file.

Environment variables

GAFAELFAWR_CONFIG_PATH

Provide a default for --config-path

delete-all-data

Delete all data from Redis and the database.

Intended for destructive upgrades, such as when switching from one upstream authentication provider to another when all of the usernames will change. This does not delete or reset UID and GID assignments from Firestore.

gafaelfawr delete-all-data [OPTIONS]

Options

--config-path <config_path>

Application configuration file.

Environment variables

GAFAELFAWR_CONFIG_PATH

Provide a default for --config-path

generate-key

Generate a new RSA key pair.

The output will be the private key of the newly-generated key pair, from which the public key can be recovered.

gafaelfawr generate-key [OPTIONS]

generate-schema

Generate SQL to create the Gafaelfawr database schema.

gafaelfawr generate-schema [OPTIONS]

Options

--config-path <config_path>

Application configuration file.

--output <output>

Output path (output to stdout if not given).

Environment variables

GAFAELFAWR_CONFIG_PATH

Provide a default for --config-path

generate-session-secret

Generate a new Gafaelfawr session secret.

gafaelfawr generate-session-secret [OPTIONS]

generate-token

Generate an encoded token.

The generated token will be syntactically valid, but will not be created in the database. It is suitable for use as a Gafaelfawr bootstrap token.

gafaelfawr generate-token [OPTIONS]

help

Show help for any command.

gafaelfawr help [OPTIONS] [TOPIC]

Arguments

TOPIC

Optional argument

init

Initialize the database storage.

gafaelfawr init [OPTIONS]

Options

--config-path <config_path>

Application configuration file.

--alembic-config-path <alembic_config_path>

Alembic configuration file.

Environment variables

GAFAELFAWR_CONFIG_PATH

Provide a default for --config-path

GAFAELFAWR_ALEMBIC_CONFIG_PATH

Provide a default for --alembic-config-path

maintenance

Perform background maintenance.

gafaelfawr maintenance [OPTIONS]

Options

--config-path <config_path>

Application configuration file.

Environment variables

GAFAELFAWR_CONFIG_PATH

Provide a default for --config-path

openapi-schema

Generate the OpenAPI schema.

gafaelfawr openapi-schema [OPTIONS]

Options

Add back link (used when generating application documentation).

--output <output>

Output path (output to stdout if not given).

run

Run the application (for testing only).

gafaelfawr run [OPTIONS]

Options

--port <port>

Port to run the application on.

update-schema

Initialize the database or update the schema.

If the database schema has not yet been initialized, create it. Then, run Alembic to perform any necessary migrations.

gafaelfawr update-schema [OPTIONS]

Options

--config-path <config_path>

Application configuration file.

--alembic-config-path <alembic_config_path>

Alembic configuration file.

Environment variables

GAFAELFAWR_CONFIG_PATH

Provide a default for --config-path

GAFAELFAWR_ALEMBIC_CONFIG_PATH

Provide a default for --alembic-config-path

validate-schema

Validate that the database schema is current.

gafaelfawr validate-schema [OPTIONS]

Options

--config-path <config_path>

Application configuration file.

Environment variables

GAFAELFAWR_CONFIG_PATH

Provide a default for --config-path

Kubernetes operator

The Kubernetes operator is not started through the gafaelfawr command-line entry point because Kopf wants to have full control over how it’s run. Instead, to start the operator, use:

kopf run -A --log-format=json -m gafaelfawr.operator