forked from mtusi2026/mtusi2026lab7
wip: apply pki-ingress-mtls groups 1-4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# Конфигурация openssl для PKI стенда (change pki-ingress-mtls, design,
|
||||
# решения 1 и 2): база `openssl ca` в каталоге оператора и профили
|
||||
# сертификатов. Читает только infra/pki/pki.sh: он всегда задаёт
|
||||
# PKI_OPERATOR_DIR и PKI_SAN в окружении openssl (без них конфигурация не
|
||||
# разбирается). Правила — .claude/rules/tls.md.
|
||||
|
||||
[ ca ]
|
||||
default_ca = operator_ca
|
||||
|
||||
# база CA: index.txt, serial, crlnumber и копии выпущенных сертификатов по
|
||||
# серийному номеру (нужны для отзыва и CRL). Ключей leaf здесь нет
|
||||
[ operator_ca ]
|
||||
dir = $ENV::PKI_OPERATOR_DIR
|
||||
database = $dir/index.txt
|
||||
new_certs_dir = $dir/certs
|
||||
serial = $dir/serial
|
||||
crlnumber = $dir/crlnumber
|
||||
certificate = $dir/ca.crt
|
||||
private_key = $dir/ca.key
|
||||
default_md = sha256
|
||||
default_days = 90
|
||||
default_crl_days = 30
|
||||
policy = policy_identity
|
||||
# перевыпуск identity с тем же subject — штатный шаг (make pki_stand)
|
||||
unique_subject = no
|
||||
# расширения задаёт только профиль, а не CSR
|
||||
copy_extensions = none
|
||||
email_in_dn = no
|
||||
name_opt = ca_default
|
||||
cert_opt = ca_default
|
||||
crl_extensions = crl_ext
|
||||
|
||||
[ policy_identity ]
|
||||
commonName = supplied
|
||||
|
||||
[ req ]
|
||||
distinguished_name = req_dn
|
||||
prompt = no
|
||||
default_md = sha256
|
||||
|
||||
[ req_dn ]
|
||||
CN = unused
|
||||
|
||||
[ crl_ext ]
|
||||
authorityKeyIdentifier = keyid:always
|
||||
|
||||
# корневой CA: подписывает leaf напрямую, промежуточного нет
|
||||
[ ca_ext ]
|
||||
basicConstraints = critical, CA:true, pathlen:0
|
||||
keyUsage = critical, keyCertSign, cRLSign
|
||||
subjectKeyIdentifier = hash
|
||||
|
||||
# сервер TLS (api, ingress): только serverAuth — клиентом реплики он быть
|
||||
# не может (проверка назначения sslclient на стороне сервера)
|
||||
[ server_ext ]
|
||||
basicConstraints = critical, CA:false
|
||||
keyUsage = critical, digitalSignature
|
||||
extendedKeyUsage = serverAuth
|
||||
subjectKeyIdentifier = hash
|
||||
authorityKeyIdentifier = keyid:always
|
||||
subjectAltName = $ENV::PKI_SAN
|
||||
|
||||
# клиент TLS (haproxy, разовые пробы): только clientAuth
|
||||
[ client_ext ]
|
||||
basicConstraints = critical, CA:false
|
||||
keyUsage = critical, digitalSignature
|
||||
extendedKeyUsage = clientAuth
|
||||
subjectKeyIdentifier = hash
|
||||
authorityKeyIdentifier = keyid:always
|
||||
subjectAltName = $ENV::PKI_SAN
|
||||
Reference in New Issue
Block a user