Repository navigation
Expand file tree
/
Copy pathconfig.example.toml
More file actions
168 lines (147 loc) · 5.47 KB
/
Copy pathconfig.example.toml
File metadata and controls
168 lines (147 loc) · 5.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
[server]
host = "0.0.0.0"
port = 7021
# Optional path to webui static files.
# webui_dir = "./webui"
# External base URL for generating absolute URLs such as OIDC callback URLs.
# "auto" (default) = infer from request headers at runtime:
# Forwarded (RFC 7239) > X-Forwarded-Host/Proto > Host header > http://{host}:{port}
# Or set a fixed URL, for example:
# external_base_url = "https://auth.example.com"
# Remove the entire [oidc] section, or set OIDC_ENABLED=false, to disable OIDC
# and use dev-session login instead.
[oidc]
client_id = "your-client-id"
client_secret = "your-client-secret"
well_known_url = "https://your-oidc-provider.com/.well-known/openid-configuration"
# Optional direct endpoint overrides when well_known_url is not used, or when a
# discovered value should be overridden.
# issuer_url = "https://your-oidc-provider.com"
# jwks_uri = "https://your-oidc-provider.com/jwks"
[oidc_client]
scopes = ["openid", "profile", "email"]
# claims_check_script = "./claims-script-check.mts"
# pkce_enabled = true
# device_poll_interval = "5s"
# Optional direct endpoint overrides.
# authorization_endpoint = "https://your-oidc-provider.com/authorize"
# token_endpoint = "https://your-oidc-provider.com/token"
# userinfo_endpoint = "https://your-oidc-provider.com/userinfo"
# Optional pending OAuth store tuning.
# [oidc_client.pending_store]
# ttl = "5m"
# max_capacity = 1000
# When enabled, refresh tokens are sealed before leaving the server-side
# auth-context layer.
# [oidc_client.refresh_material_protection]
# kind = "sealed"
# master_key = "01234567890123456789012345678901"
# Pending metadata redemption store tuning.
# [oidc_client.metadata_delivery]
# kind = "redemption"
# ttl = "60s"
# max_capacity = 1000
# Post-auth redirect for backend OIDC mode. The current default is effectively
# open (`allowed_redirect_targets = [{ kind = "all" }]`), so tighten this in
# production.
# [oidc_client.post_auth_redirect]
# kind = "resolved"
# dynamic_redirect_target_enabled = true
# allowed_redirect_targets = [{ kind = "all" }]
# Optional backend-mode-only override layer.
# [backend_oidc_override]
# pkce_enabled = true
# Optional frontend-mode-only override layer.
[frontend_oidc_override]
unsafe_frontend_client_secret = "enabled"
# pkce_enabled = true
[session_context]
# cookie_name = "securitydept_session"
# session_context_key = "securitydept.session_context"
# cookie_path = "/"
# http_only = true
# secure = false # set true for HTTPS deployments
# same_site = "lax" # "strict", "lax", or "none"
# ttl = "1d" # omit to disable expiry
[oauth_resource_server]
# audiences = ["api://securitydept"]
# required_scopes = ["entries.read"]
# Downstream bearer propagation policy.
# [oauth_resource_server.token_propagation]
# kind = "enabled"
# default_policy = "validate_then_forward"
#
# [oauth_resource_server.token_propagation.destination_policy]
# allowed_node_ids = ["registry-mirror-a"]
# allowed_targets = [
# { kind = "exact_origin", scheme = "https", hostname = "service.internal.example.com", port = 443 },
# { kind = "domain_suffix", scheme = "https", domain_suffix = "mesh.internal.example.com", port = 443 },
# ]
#
# Local same-server propagation smoke example used by the current webui
# token-set page:
# allowed_targets = [
# { kind = "exact_origin", scheme = "http", hostname = "localhost", port = 7021 },
# ]
#
# [oauth_resource_server.token_propagation.token_validation]
# required_issuers = ["https://your-oidc-provider.com"]
# allowed_audiences = ["mesh-api"]
# required_scopes = ["mesh.forward"]
# allowed_azp = ["securitydept-web"]
[creds_manage]
data_path = "./data/data.json"
[basic_auth_context]
# This is the dashboard-management basic-auth config used for /basic/*
# and /basic/api/*, not the managed creds stored in creds_manage.
# realm = "securitydept"
# post_auth_redirect is NOT configurable in this deployment.
# The server always redirects to '/' (dashboard root) after basic auth login,
# ignoring any user-configured or query-param-supplied redirect targets.
# Configuring this has no effect and will emit a startup warning.
# Optional real-IP access restriction for dashboard basic-auth.
# When this section is set, [real_ip_resolve] must also be configured.
# [basic_auth_context.real_ip_access]
# allowed_cidrs = ["10.0.0.0/8", "192.168.0.0/16"]
# allow_fallback = false
[[basic_auth_context.users]]
# Generate this complete block with:
# securitydept-cli creds create-basic --interactive
username = "admin"
password_hash = "$argon2id$v=19$m=19456,t=2,p=1$replace$with$your$argon2$hash"
# Optional realm override for the basic-auth dashboard zone.
# [[basic_auth_context.zones]]
# realm = "securitydept"
# Optional real-IP resolution strategy. Required when
# basic_auth_context.real_ip_access is configured.
# [real_ip_resolve.fallback]
# strategy = "remote-addr"
#
# [[real_ip_resolve.nodes]]
# name = "edge-proxy"
# kind = "cidrs-inline"
# cidrs = ["10.0.0.0/24", "192.168.10.0/24"]
# accepts_from = ["edge-proxy"]
#
# [[real_ip_resolve.rules]]
# name = "edge-resolved"
# kind = "trusted-resolved-header"
# priority = 300
# headers = ["x-trusted-real-ip"]
# direct_peer_nodes = ["edge-proxy"]
#
# [[real_ip_resolve.rules]]
# name = "edge-xff"
# kind = "x-forwarded-for"
# priority = 200
# headers = ["x-forwarded-for"]
# direction = "right-to-left"
# direct_peer_nodes = ["edge-proxy"]
#
# [[real_ip_resolve.rules]]
# name = "edge-forwarded"
# kind = "forwarded"
# priority = 100
# headers = ["forwarded"]
# direction = "right-to-left"
# direct_peer_nodes = ["edge-proxy"]