add level 3
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
defaults
|
||||
mode http
|
||||
timeout connect 2s
|
||||
timeout client 30s
|
||||
timeout server 30s
|
||||
frontend s3_tls
|
||||
bind :8333 ssl crt /run/secrets/server.pem ssl-min-ver TLSv1.2
|
||||
# Multipart form POST is not used by this application; deny it at the boundary.
|
||||
http-request deny if { method POST }
|
||||
# Only the four locally provisioned SigV4 identities may use this endpoint.
|
||||
acl admin_auth req.hdr(Authorization) -m reg -f /run/secrets/admin_acl
|
||||
acl api_auth req.hdr(Authorization) -m reg -f /run/secrets/api_acl
|
||||
acl worker_auth req.hdr(Authorization) -m reg -f /run/secrets/worker_acl
|
||||
acl reconcile_auth req.hdr(Authorization) -m reg -f /run/secrets/reconcile_acl
|
||||
http-request deny unless admin_auth or api_auth or worker_auth or reconcile_auth
|
||||
# Application-generated keys contain no escapes or dot segments. Reject
|
||||
# ambiguous paths so the prefix checks and the backend see the same path.
|
||||
http-request deny if { path -m sub % } or { path -m sub /../ } or { path -m sub /./ } or { path -m sub // } or { path_end /.. } or { path_end /. }
|
||||
http-request deny if api_auth { method PUT DELETE } !{ path_beg /messenger-attachments/staging/ }
|
||||
http-request deny if worker_auth { method PUT DELETE } !{ path_beg /messenger-attachments/staging/ /messenger-attachments/originals/ /messenger-attachments/variants/ }
|
||||
http-request deny if reconcile_auth { method PUT DELETE } !{ path_beg /messenger-attachments/staging/ /messenger-attachments/originals/ /messenger-attachments/variants/ }
|
||||
default_backend s3_local
|
||||
backend s3_local
|
||||
server s3 127.0.0.1:18333 ssl verify required ca-file /run/secrets/ca.crt verifyhost s3 check
|
||||
Reference in New Issue
Block a user