Configuration file reference

Reference

The configuration file is in YAML format, and named sni.yml by default. It follows the following schema:

Config

SNI configuration model

type

object

properties

  • database

Database

Database configuration document.

default

authentication_source

admin

database

sni

host

mongo

password

port

27017

username

sni

allOf

#/definitions/DatabaseConfig

  • discord

Discord

Discord configuration document.

default

auth_channel_id

0

enabled

False

log_channel_id

0

server_id

0

token

allOf

#/definitions/DiscordConfig

  • esi

Esi

ESI configuration document.

default

client_id

client_secret

allOf

#/definitions/ESIConfig

  • general

General

General configuration document.

default

debug

False

host

0.0.0.0

logging_level

info

port

80

root_url

https://foo.bar

scheduler_thread_count

5

allOf

#/definitions/GeneralConfig

  • jwt

Jwt

JWT configuration document.

default

algorithm

HS256

secret

allOf

#/definitions/JWTConfig

  • redis

Redis

Redis configuration document.

default

database

0

host

redis

port

6379

allOf

#/definitions/RedisConfig

  • sentry

Sentry

Sentry configuration document.

default

dsn

https://examplePublicKey@o0.ingest.sentry.io/0

enabled

False

traces_sample_rate

0

allOf

#/definitions/SentryConfig

  • teamspeak

Teamspeak

Teamspeak configuration document.

default

auth_group_name

SNI TS AUTH

bot_name

SeAT Navy Issue

enabled

False

host

password

port

10011

server_id

0

username

sni

allOf

#/definitions/TeamspeakConfig

additionalProperties

False

definitions

  • DatabaseConfig

DatabaseConfig

Database configuration model

type

object

properties

  • authentication_source

Authentication Source

The database in which the user belongs.

type

string

default

admin

  • database

Database

Database name.

type

string

default

sni

  • host

Host

Database hostname.

type

string

default

mongo

  • password

Password

Password.

type

string

default

format

password

  • port

Port

Database port.

type

integer

maximum

65535

minimum

0

default

27017

  • username

Username

Username.

type

string

default

sni

  • DiscordConfig

DiscordConfig

Discord configuration model

type

object

properties

  • auth_channel_id

Auth Channel Id

Authentication channel ID. This is where users will start authentication challenges. Only required if discord.enable is set to True.

type

integer

default

0

  • enabled

Enabled

Wether to activate the Discord connector.

type

boolean

default

False

  • log_channel_id

Log Channel Id

Logging channel ID. This is where the Discorb bot will log events. Only required if discord.enable is set to True.

type

integer

default

0

  • server_id

Server Id

Discord server (or guild) ID.

type

integer

default

0

  • token

Token

Discord bot token. Only required if discord.enable is set to True.

type

string

default

format

password

  • ESIConfig

ESIConfig

ESI configuration model

type

object

properties

  • client_id

Client Id

ESI client ID.

type

string

default

format

password

  • client_secret

Client Secret

ESI client secret.

type

string

default

format

password

  • LoggingLevel

LoggingLevel

Acceptable logging levels

type

string

enum

critical, debug, error, info, warning

  • GeneralConfig

GeneralConfig

General configuration model

type

object

properties

  • debug

Debug

Wether SNI should run in debug mode. In this mode, logging is more verbose, and potentially exposes secrets. Do not use in a production environment.

type

boolean

default

False

  • host

Host

IP address at which SNI should listen for incoming connections.

default

0.0.0.0

anyOf

type

string

format

ipv4

type

string

format

ipv6

  • logging_level

Logging level.

default

info

allOf

#/definitions/LoggingLevel

  • port

Port

Port at which SNI should listen for incoming connections.

type

integer

maximum

65535

minimum

0

default

80

  • root_url

Root Url

URL at which this SNI instance is located. The ESI callback should then be <root_url>/callback/esi.

type

string

maxLength

2083

minLength

1

default

https://foo.bar

format

uri

  • scheduler_thread_count

Scheduler Thread Count

Number of threads available to the scheduler.

type

integer

minimum

1

default

5

  • JWTAlgorithm

JWTAlgorithm

Acceptable JWT algorithms, see here.

type

string

enum

HS256, HS384, HS512

  • JWTConfig

JWTConfig

JWT configuration model

type

object

properties

  • algorithm

JWT algorithm. For now, only symmetric cryptography algorithms are supported.

default

HS256

allOf

#/definitions/JWTAlgorithm

  • secret

Secret

JWT secret. Generate one with openssl rand -hex 32.

type

string

default

format

password

  • RedisConfig

RedisConfig

Redis configuration model

type

object

properties

  • database

Database

Redis database to use.

type

integer

default

0

  • host

Host

Redis hostname.

type

string

default

redis

  • port

Port

Redis port.

type

integer

maximum

65535

minimum

0

default

6379

  • SentryConfig

SentryConfig

Sentry configuration model.

See also:

Sentry homepage <https://sentry.io/welcome/> Sentry documentation for Python ASGI

type

object

properties

  • dsn

Dsn

Optional Sentry DSN (https://sentry.io/welcome/).

type

string

maxLength

2083

minLength

1

default

https://examplePublicKey@o0.ingest.sentry.io/0

format

uri

  • enabled

Enabled

Wether to activate the Sentry middleware.

type

boolean

default

False

  • traces_sample_rate

Traces Sample Rate

Trace sample rate.

type

number

maximum

1

minimum

0

default

0

  • TeamspeakConfig

TeamspeakConfig

Teamspeak configuration model

type

object

properties

  • auth_group_name

Auth Group Name

Name of the auth group. Authenticated Teamspeak users are automatically added to this group. Only required if teamspeak.enable is set to True.

type

string

default

SNI TS AUTH

  • bot_name

Bot Name

Name of the Teamspeak bot. Only required if teamspeak.enable is set to True.

type

string

default

SeAT Navy Issue

  • enabled

Enabled

Wether to activate the Teamspeak connector.

type

boolean

default

False

  • host

Host

Name, hostname, or IP address of the Teamspeak server. Only required if teamspeak.enable is set to True.

type

string

default

  • password

Password

Query server password. Only required if teamspeak.enable is set to True.

type

string

default

format

password

  • port

Port

Port of the query server associated to the Teamspeak server. Only required if teamspeak.enable is set to True.

type

integer

maximum

65535

minimum

0

default

10011

  • server_id

Server Id

Teamspeak server ID. Only required if teamspeak.enable is set to True.

type

integer

default

0

  • username

Username

Query server username. Only required if teamspeak.enable is set to True.

type

string

default

sni

Example

database:
    host: mongodb
    password: snipassword
    username: sni
discord:
    auth_channel_id: 000000000000000000
    auth_role_name: SNI AUTH
    enabled: true
    log_channel_id: 111111111111111111
    server_id: 222222222222222222
    token: tokentokentokentokentokentokentokentokentokentokentoken0000
esi:
    client_id: idididididididididididididididid
    client_secret: secretsecretsecretsecretsecretsecret0000
general:
    debug: false
    root_url: 'https://sni.example.com'
jwt:
    secret: secretsecretsecretsecretsecretsecretsecretsecretsecretsecret0000
redis:
    host: redis
teamspeak:
    enabled: true
    host: 100.200.300.400
    password: aaaaaaaa
    username: sni