2023-08-25 17:32:00 +02:00
|
|
|
# Emissary server configuration
|
|
|
|
|
|
|
|
# Logger configuration
|
2023-02-02 10:55:24 +01:00
|
|
|
logger:
|
2023-08-25 17:32:00 +02:00
|
|
|
# Logging verbosity
|
|
|
|
# DEBUG: 0
|
|
|
|
# INFO: 1
|
|
|
|
# WARN: 2
|
|
|
|
# ERROR: 3
|
|
|
|
# CRITICAL: 4
|
2023-02-02 10:55:24 +01:00
|
|
|
level: 1
|
2023-08-25 17:32:00 +02:00
|
|
|
# Logging format
|
|
|
|
# Possible values: human, json
|
2023-02-02 10:55:24 +01:00
|
|
|
format: human
|
2023-08-25 17:32:00 +02:00
|
|
|
|
|
|
|
# Server configuration
|
2023-03-08 17:30:31 +01:00
|
|
|
server:
|
2023-08-25 17:32:00 +02:00
|
|
|
# HTTP server configuration
|
2023-03-08 17:30:31 +01:00
|
|
|
http:
|
2023-08-25 17:32:00 +02:00
|
|
|
# Listening address (0.0.0.0 to listen on all interfaces)
|
2023-03-08 17:30:31 +01:00
|
|
|
host: 0.0.0.0
|
2023-08-25 17:32:00 +02:00
|
|
|
# Listening port
|
2023-03-08 17:30:31 +01:00
|
|
|
port: 3000
|
2023-08-25 17:32:00 +02:00
|
|
|
|
|
|
|
# Database configuration
|
2023-03-08 17:30:31 +01:00
|
|
|
database:
|
2023-08-25 17:32:00 +02:00
|
|
|
# Database driver
|
|
|
|
# Possible values: sqlite
|
2023-03-08 17:30:31 +01:00
|
|
|
driver: sqlite
|
2023-08-25 17:32:00 +02:00
|
|
|
# Database DSN
|
|
|
|
# sqlite: see https://github.com/mattn/go-sqlite3#connection-string
|
2023-04-06 15:06:16 +02:00
|
|
|
dsn: sqlite:///var/lib/emissary/data.sqlite?_pragma=foreign_keys(1)&_pragma=busy_timeout=60000
|
2023-08-25 17:32:00 +02:00
|
|
|
|
|
|
|
# CORS configuration
|
|
|
|
# See https://developer.mozilla.org/en/docs/Glossary/CORS
|
2023-03-08 17:30:31 +01:00
|
|
|
cors:
|
|
|
|
allowedOrigins: []
|
|
|
|
allowCredentials: true
|
|
|
|
allowMethods:
|
|
|
|
- POST
|
|
|
|
- GET
|
|
|
|
- PUT
|
|
|
|
- DELETE
|
|
|
|
allowedHeaders:
|
|
|
|
- Origin
|
|
|
|
- Accept
|
|
|
|
- Content-Type
|
|
|
|
- Authorization
|
|
|
|
- Sentry-Trace
|
2023-08-25 17:32:00 +02:00
|
|
|
|
|
|
|
# Auth configuration
|
2023-07-26 15:14:49 +02:00
|
|
|
auth:
|
2023-08-25 17:32:00 +02:00
|
|
|
# Local authentication configuration
|
2023-07-26 15:14:49 +02:00
|
|
|
local:
|
|
|
|
privateKeyPath: /var/lib/emissary/server-key.json
|
2023-08-25 17:32:00 +02:00
|
|
|
|
|
|
|
# Remote authentication configuration
|
|
|
|
# Disabled by default
|
2023-07-26 15:14:49 +02:00
|
|
|
remote: ~
|
|
|
|
# jwksUrl: https://my-server/.well-known/jwks.json
|
2023-08-25 17:32:00 +02:00
|
|
|
|
|
|
|
# Role extraction rules
|
|
|
|
# Permit to derivate user's role
|
|
|
|
# from the received JWT.
|
|
|
|
#
|
|
|
|
# The first rule returning a non empty
|
|
|
|
# string will define the role of the user.
|
|
|
|
#
|
|
|
|
# The role should be 'reader' or 'writer'.
|
|
|
|
roleExtractionRules:
|
|
|
|
- "jwt.role != nil ? str(jwt.role) : ''"
|