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 configuration document. |
||||
default |
authentication_source |
admin |
||
database |
sni |
|||
host |
mongo |
|||
password |
||||
port |
27017 |
|||
username |
sni |
|||
allOf |
#/definitions/DatabaseConfig |
|||
|
Discord |
|||
Discord configuration document. |
||||
default |
auth_channel_id |
0 |
||
enabled |
False |
|||
log_channel_id |
0 |
|||
server_id |
0 |
|||
token |
||||
allOf |
#/definitions/DiscordConfig |
|||
|
Esi |
|||
ESI configuration document. |
||||
default |
client_id |
|||
client_secret |
||||
allOf |
#/definitions/ESIConfig |
|||
|
General |
|||
General configuration document. |
||||
default |
debug |
False |
||
host |
0.0.0.0 |
|||
logging_level |
info |
|||
port |
80 |
|||
root_url |
||||
scheduler_thread_count |
5 |
|||
allOf |
#/definitions/GeneralConfig |
|||
|
Jwt |
|||
JWT configuration document. |
||||
default |
algorithm |
HS256 |
||
secret |
||||
allOf |
#/definitions/JWTConfig |
|||
|
Redis |
|||
Redis configuration document. |
||||
default |
database |
0 |
||
host |
redis |
|||
port |
6379 |
|||
allOf |
#/definitions/RedisConfig |
|||
|
Sentry |
|||
Sentry configuration document. |
||||
default |
dsn |
|||
enabled |
False |
|||
traces_sample_rate |
0 |
|||
allOf |
#/definitions/SentryConfig |
|||
|
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 |
|||
Database configuration model |
||||
type |
object |
|||
properties |
||||
|
Authentication Source |
|||
The database in which the user belongs. |
||||
type |
string |
|||
default |
admin |
|||
|
Database |
|||
Database name. |
||||
type |
string |
|||
default |
sni |
|||
|
Host |
|||
Database hostname. |
||||
type |
string |
|||
default |
mongo |
|||
|
Password |
|||
Password. |
||||
type |
string |
|||
default |
||||
format |
password |
|||
|
Port |
|||
Database port. |
||||
type |
integer |
|||
maximum |
65535 |
|||
minimum |
0 |
|||
default |
27017 |
|||
|
Username |
|||
Username. |
||||
type |
string |
|||
default |
sni |
|||
|
DiscordConfig |
|||
Discord configuration model |
||||
type |
object |
|||
properties |
||||
|
Auth Channel Id |
|||
Authentication channel ID. This is where users will start authentication challenges. Only required if |
||||
type |
integer |
|||
default |
0 |
|||
|
Enabled |
|||
Wether to activate the Discord connector. |
||||
type |
boolean |
|||
default |
False |
|||
|
Log Channel Id |
|||
Logging channel ID. This is where the Discorb bot will log events. Only required if |
||||
type |
integer |
|||
default |
0 |
|||
|
Server Id |
|||
Discord server (or guild) ID. |
||||
type |
integer |
|||
default |
0 |
|||
|
Token |
|||
Discord bot token. Only required if |
||||
type |
string |
|||
default |
||||
format |
password |
|||
|
ESIConfig |
|||
ESI configuration model |
||||
type |
object |
|||
properties |
||||
|
Client Id |
|||
ESI client ID. |
||||
type |
string |
|||
default |
||||
format |
password |
|||
|
Client Secret |
|||
ESI client secret. |
||||
type |
string |
|||
default |
||||
format |
password |
|||
|
LoggingLevel |
|||
Acceptable logging levels |
||||
type |
string |
|||
enum |
critical, debug, error, info, warning |
|||
|
GeneralConfig |
|||
General configuration model |
||||
type |
object |
|||
properties |
||||
|
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 |
|||
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. |
|||
default |
info |
|||
allOf |
#/definitions/LoggingLevel |
|||
|
Port |
|||
Port at which SNI should listen for incoming connections. |
||||
type |
integer |
|||
maximum |
65535 |
|||
minimum |
0 |
|||
default |
80 |
|||
|
Root Url |
|||
URL at which this SNI instance is located. The ESI callback should then be |
||||
type |
string |
|||
maxLength |
2083 |
|||
minLength |
1 |
|||
default |
||||
format |
uri |
|||
|
Scheduler Thread Count |
|||
Number of threads available to the scheduler. |
||||
type |
integer |
|||
minimum |
1 |
|||
default |
5 |
|||
|
JWTAlgorithm |
|||
Acceptable JWT algorithms, see here. |
||||
type |
string |
|||
enum |
HS256, HS384, HS512 |
|||
|
JWTConfig |
|||
JWT configuration model |
||||
type |
object |
|||
properties |
||||
|
JWT algorithm. For now, only symmetric cryptography algorithms are supported. |
|||
default |
HS256 |
|||
allOf |
#/definitions/JWTAlgorithm |
|||
|
Secret |
|||
JWT secret. Generate one with |
||||
type |
string |
|||
default |
||||
format |
password |
|||
|
RedisConfig |
|||
Redis configuration model |
||||
type |
object |
|||
properties |
||||
|
Database |
|||
Redis database to use. |
||||
type |
integer |
|||
default |
0 |
|||
|
Host |
|||
Redis hostname. |
||||
type |
string |
|||
default |
redis |
|||
|
Port |
|||
Redis port. |
||||
type |
integer |
|||
maximum |
65535 |
|||
minimum |
0 |
|||
default |
6379 |
|||
|
SentryConfig |
|||
Sentry configuration model.
|
||||
type |
object |
|||
properties |
||||
|
Dsn |
|||
Optional Sentry DSN (https://sentry.io/welcome/). |
||||
type |
string |
|||
maxLength |
2083 |
|||
minLength |
1 |
|||
default |
||||
format |
uri |
|||
|
Enabled |
|||
Wether to activate the Sentry middleware. |
||||
type |
boolean |
|||
default |
False |
|||
|
Traces Sample Rate |
|||
Trace sample rate. |
||||
type |
number |
|||
maximum |
1 |
|||
minimum |
0 |
|||
default |
0 |
|||
|
TeamspeakConfig |
|||
Teamspeak configuration model |
||||
type |
object |
|||
properties |
||||
|
Auth Group Name |
|||
Name of the auth group. Authenticated Teamspeak users are automatically added to this group. Only required if |
||||
type |
string |
|||
default |
SNI TS AUTH |
|||
|
Bot Name |
|||
Name of the Teamspeak bot. Only required if |
||||
type |
string |
|||
default |
SeAT Navy Issue |
|||
|
Enabled |
|||
Wether to activate the Teamspeak connector. |
||||
type |
boolean |
|||
default |
False |
|||
|
Host |
|||
Name, hostname, or IP address of the Teamspeak server. Only required if |
||||
type |
string |
|||
default |
||||
|
Password |
|||
Query server password. Only required if |
||||
type |
string |
|||
default |
||||
format |
password |
|||
|
Port |
|||
Port of the query server associated to the Teamspeak server. Only required if |
||||
type |
integer |
|||
maximum |
65535 |
|||
minimum |
0 |
|||
default |
10011 |
|||
|
Server Id |
|||
Teamspeak server ID. Only required if |
||||
type |
integer |
|||
default |
0 |
|||
|
Username |
|||
Query server username. Only required if |
||||
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