Lab7: HTTPS, mTLS, OpenBao, трек 2 PKI на оценку 5
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
global
|
||||
maxconn 256
|
||||
tune.bufsize 65536
|
||||
tune.maxrewrite 8192
|
||||
tune.ssl.default-dh-param 2048
|
||||
ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
|
||||
ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11
|
||||
ssl-default-server-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
|
||||
ssl-default-server-options no-sslv3 no-tlsv10 no-tlsv11
|
||||
|
||||
defaults
|
||||
mode http
|
||||
timeout connect 2s
|
||||
timeout client 60s
|
||||
timeout server 60s
|
||||
timeout http-request 60s
|
||||
timeout http-keep-alive 2s
|
||||
timeout queue 2s
|
||||
timeout check 2s
|
||||
option redispatch
|
||||
option dontlognull
|
||||
retries 2
|
||||
retry-on conn-failure empty-response 502 503 504
|
||||
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 1s
|
||||
hold other 1s
|
||||
hold refused 1s
|
||||
hold nx 1s
|
||||
hold timeout 1s
|
||||
hold obsolete 1s
|
||||
accepted_payload_size 8192
|
||||
|
||||
frontend web
|
||||
bind *:8443 ssl crt /etc/certs/private/public.pem alpn h2,http/1.1
|
||||
# Только HTTPS снаружи. HTTP-порт API не публикуется.
|
||||
default_backend api
|
||||
|
||||
backend api
|
||||
balance roundrobin
|
||||
acl upload method POST path_reg -i ^/api/v1/chats/[0-9a-fA-F-]+/attachments$
|
||||
http-request wait-for-body time 2s if METH_POST !upload
|
||||
http-request disable-l7-retry if upload
|
||||
option httpchk
|
||||
http-check send meth GET uri /health/ready ver HTTP/1.1 hdr Host api
|
||||
http-check expect status 200
|
||||
# mTLS к каждой реплике: клиентский сертификат LB + проверка серверного SAN api.
|
||||
server-template api 8 api:8443 check inter 500ms fall 2 rise 2 resolvers docker init-addr none resolve-prefer ipv4 on-marked-down shutdown-sessions ssl verify required ca-file /etc/certs/ca.crt crt /etc/certs/private/lb.pem verifyhost api check-ssl
|
||||
Reference in New Issue
Block a user