Add YAML-configured ACLs with Basic and IP authorization

This commit is contained in:
2026-10-28 13:37:03 +00:00
parent d34b3e10f7
commit ad168aae63
10 changed files with 1366 additions and 76 deletions
+24
View File
@@ -0,0 +1,24 @@
listen_addr: "127.0.0.1:8080"
connect_timeout_ms: 10000
upstream_timeout_ms: 30000
acl:
default_action: deny
users: {}
rules:
- name: localhost
action: allow
networks: ["127.0.0.1/32", "::1/128"]
# To require Basic authentication, generate a hash with
# `cargo run -- hash-password`, then configure a user and rule:
#
# acl:
# default_action: deny
# users:
# alice:
# password_hash: "$argon2id$v=19$m=19456,t=2,p=1$..."
# rules:
# - name: alice
# action: allow
# users: ["alice"]