Skip to content

Commit 160ff02

Browse files
fix(config): correct KDL syntax for booleans and arrays
- Change true/false to #true/#false (KDL boolean syntax) - Change [value1 value2] to value1 value2 (KDL array syntax) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 33030d8 commit 160ff02

1 file changed

Lines changed: 25 additions & 31 deletions

File tree

config/sentinel.kdl

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ server {
66
worker-threads 0 // 0 = number of CPU cores
77
max-connections 10000
88
graceful-shutdown-timeout-secs 30
9-
daemon false
9+
daemon #false
1010
pid-file "/var/run/sentinel.pid"
1111
}
1212

@@ -31,8 +31,8 @@ listeners {
3131
cert-file "/etc/sentinel/certs/server.crt"
3232
key-file "/etc/sentinel/certs/server.key"
3333
min-version "TLS1.2"
34-
ocsp-stapling true
35-
session-resumption true
34+
ocsp-stapling #true
35+
session-resumption #true
3636
cipher-suites {
3737
- "TLS_AES_128_GCM_SHA256"
3838
- "TLS_AES_256_GCM_SHA384"
@@ -69,7 +69,7 @@ filters {
6969
agent "waf-agent"
7070
timeout-ms 200
7171
failure-mode "closed"
72-
inspect-body true
72+
inspect-body #true
7373
}
7474

7575
// Built-in rate limit filter (alternative to agent)
@@ -127,9 +127,9 @@ routes {
127127
}
128128
}
129129

130-
// Filter chain: executed in array order
131-
filters ["auth" "rate-limit"]
132-
waf-enabled true
130+
// Filter chain: executed in order
131+
filters "auth" "rate-limit"
132+
waf-enabled #true
133133

134134
circuit-breaker {
135135
failure-threshold 5
@@ -143,7 +143,7 @@ routes {
143143
timeout-ms 5000
144144
backoff-base-ms 100
145145
backoff-max-ms 2000
146-
retryable-status-codes [502 503 504]
146+
retryable-status-codes 502 503 504
147147
}
148148
}
149149

@@ -200,8 +200,8 @@ routes {
200200

201201
policies {
202202
timeout-secs 3600 // 1 hour for WebSocket
203-
buffer-requests false
204-
buffer-responses false
203+
buffer-requests #false
204+
buffer-responses #false
205205
}
206206
}
207207

@@ -293,7 +293,7 @@ upstreams {
293293

294294
tls {
295295
sni "cdn.example.com"
296-
insecure-skip-verify false
296+
insecure-skip-verify #false
297297
}
298298
}
299299

@@ -350,7 +350,7 @@ agents {
350350
transport "unix_socket" {
351351
path "/var/run/sentinel/auth.sock"
352352
}
353-
events ["request_headers"]
353+
events "request_headers"
354354
timeout-ms 100
355355
failure-mode "closed" // Fail-closed for auth
356356

@@ -367,7 +367,7 @@ agents {
367367
transport "unix_socket" {
368368
path "/var/run/sentinel/ratelimit.sock"
369369
}
370-
events ["request_headers"]
370+
events "request_headers"
371371
timeout-ms 50
372372
failure-mode "open" // Fail-open for rate limiting
373373
}
@@ -377,7 +377,7 @@ agents {
377377
transport "unix_socket" {
378378
path "/var/run/sentinel/waf.sock"
379379
}
380-
events ["request_headers" "request_body"]
380+
events "request_headers" "request_body"
381381
timeout-ms 200
382382
failure-mode "closed"
383383
max-request-body-bytes 1048576 // 1MB
@@ -396,31 +396,25 @@ waf {
396396

397397
exclusions {
398398
exclusion {
399-
rule-ids ["920350" "920420"]
399+
rule-ids "920350" "920420"
400400
scope "global"
401401
}
402402
exclusion {
403-
rule-ids ["941100"]
403+
rule-ids "941100"
404404
scope "path" "/api/v1/upload"
405405
}
406406
}
407407
}
408408

409409
mode "prevention" // "detection" or "prevention"
410-
audit-log true
410+
audit-log #true
411411

412412
body-inspection {
413-
inspect-request-body true
414-
inspect-response-body false
413+
inspect-request-body #true
414+
inspect-response-body #false
415415
max-inspection-bytes 1048576 // 1MB
416-
content-types [
417-
"application/x-www-form-urlencoded"
418-
"multipart/form-data"
419-
"application/json"
420-
"application/xml"
421-
"text/xml"
422-
]
423-
decompress true
416+
content-types "application/x-www-form-urlencoded" "multipart/form-data" "application/json" "application/xml" "text/xml"
417+
decompress #true
424418
max-decompression-ratio 100.0
425419
}
426420
}
@@ -466,19 +460,19 @@ limits {
466460
// Observability configuration
467461
observability {
468462
metrics {
469-
enabled true
463+
enabled #true
470464
address "0.0.0.0:9090"
471465
path "/metrics"
472-
high-cardinality false
466+
high-cardinality #false
473467
}
474468

475469
logging {
476470
level "info" // "trace", "debug", "info", "warn", "error"
477471
format "json" // "json" or "pretty"
478-
timestamps true
472+
timestamps #true
479473

480474
access-log {
481-
enabled true
475+
enabled #true
482476
file "/var/log/sentinel/access.log"
483477
format "combined"
484478
buffer-size 8192

0 commit comments

Comments
 (0)