Simplify the default MAS configuration

This commit is contained in:
Quentin Gliech
2025-08-05 09:34:16 +02:00
parent dd402c834c
commit c7f5d91504
@@ -29,14 +29,8 @@ const DEFAULT_CONFIG = {
{ name: "human" }, { name: "human" },
{ name: "oauth" }, { name: "oauth" },
{ name: "compat" }, { name: "compat" },
{ { name: "graphql" },
name: "graphql", { name: "assets" },
playground: true,
},
{
name: "assets",
path: "/usr/local/share/mas-cli/assets/",
},
], ],
binds: [ binds: [
{ {
@@ -60,7 +54,6 @@ const DEFAULT_CONFIG = {
proxy_protocol: false, proxy_protocol: false,
}, },
], ],
trusted_proxies: ["192.128.0.0/16", "172.16.0.0/12", "10.0.0.0/10", "127.0.0.1/8", "fd00::/8", "::1/128"],
public_base: "", // Needs to be set public_base: "", // Needs to be set
issuer: "", // Needs to be set issuer: "", // Needs to be set
}, },
@@ -70,28 +63,6 @@ const DEFAULT_CONFIG = {
database: "postgres", database: "postgres",
username: "postgres", username: "postgres",
password: "p4S5w0rD", password: "p4S5w0rD",
max_connections: 10,
min_connections: 0,
connect_timeout: 30,
idle_timeout: 600,
max_lifetime: 1800,
},
telemetry: {
tracing: {
exporter: "none",
propagators: [],
},
metrics: {
exporter: "none",
},
sentry: {
dsn: null,
},
},
templates: {
path: "/usr/local/share/mas-cli/templates/",
assets_manifest: "/usr/local/share/mas-cli/manifest.json",
translations_path: "/usr/local/share/mas-cli/translations/",
}, },
email: { email: {
from: '"Authentication Service" <root@localhost>', from: '"Authentication Service" <root@localhost>',
@@ -135,38 +106,16 @@ const DEFAULT_CONFIG = {
minimum_complexity: 0, minimum_complexity: 0,
}, },
policy: { policy: {
wasm_module: "/usr/local/share/mas-cli/policy.wasm",
client_registration_entrypoint: "client_registration/violation",
register_entrypoint: "register/violation",
authorization_grant_entrypoint: "authorization_grant/violation",
password_entrypoint: "password/violation",
email_entrypoint: "email/violation",
data: { data: {
client_registration: { client_registration: {
// allow non-SSL and localhost URIs // allow non-SSL and localhost URIs
allow_insecure_uris: true, allow_insecure_uris: true,
// EW doesn't have contacts at this time
allow_missing_contacts: true,
}, },
}, },
}, },
upstream_oauth2: {
providers: [],
},
branding: {
service_name: null,
policy_uri: null,
tos_uri: null,
imprint: null,
logo_uri: null,
},
account: { account: {
password_registration_enabled: true, password_registration_enabled: true,
}, },
experimental: {
access_token_ttl: 300,
compat_token_ttl: 300,
},
rate_limiting: { rate_limiting: {
login: { login: {
burst: 10, burst: 10,