Skip to main content

Catalog Configuration

Overview

The main configuration required is the location and credentials of a database to store the catalog. Two databases technologies are supported:

  • SQLite
  • Postgres

Configuration Options

A SQLite catalog requires the following options:

  • path: File Path of SQLite database

A Postgres catalog requires the following options:

  • user: user name of role in Postgres Catalog (Required)
  • password: password of role in Postgres Catalog (Required)
  • host: host name of Postgres Catalog (Required)
  • db: database name of role in Postgres Catalog (Required)
  • port: Port number of Postgres Catalog
  • secret: A secret key to encrypt passwords and tokens within the catalog

Priority of choosing configuration is:

  • Command Line
  • Config File
  • Default Configuration

Default Configuration

In the default setup, if no options are provided then a SQLite catalog is created ~/.config/tokern/catalog.db

Config File

All applications will pick up configuration from a file if it exists at ~/.config/tokern/catalog.yml. The config file has to be in YAML format. The following options are accepted:

catalog:
path: <path to SQLite Catalog>
user: <user name of role in Postgres Catalog>
password: <password of role in Postgres Catalog>
host: <host name of Postgres Catalog>
db: <database name of role in Postgres Catalog>
port: <Port number of Postgres Catalog>
secret: <Secret Key to encrypt passwords and tokens in the Catalog>

Only one of the options for SQLite or Postgres catalog is required.

Command line

All applications accept catalog configuration from the command line with the following options:

  • --catalog-path PATH: Path to store catalog state. Use if NOT using a database
  • --catalog-host TEXT: hostname of Postgres database. Use if catalog is a database.
  • --catalog-port INTEGER: port of Postgres database. Use if catalog is a database.
  • --catalog-user TEXT: user of Postgres database. Use if catalog is a database.
  • --catalog-password TEXT: password of Postgres database. Use if catalog is a database.
  • --catalog-database TEXT: database of Postgres database. Use if catalog is a database.
  • --catalog-secret TEXT: secret key to encrypt passwords and tokens in the Catalog