refactor(vpn): split JWT identity and OpenVPN certificate lifecycle
OpenVPN Ansible / Ansible Syntax Check (push) Successful in 43s
OpenVPN Ansible / Ansible Lint (push) Successful in 1m8s
OpenVPN Ansible / Deploy VPN Networking and OpenVPN (push) Successful in 3m32s
OpenVPN Ansible / Generate SBOM (push) Successful in 55s
OpenVPN Ansible / Scan SBOM with Trivy (push) Successful in 18s

- Add a dedicated role and workflow to generate VPN JWT identities and export public keys
- Run identity preparation automatically for VPN nodes awaiting OpenBao registration
- Gate OpenVPN and PKI setup until each node is registered
- Split PKI setup into runtime, configuration, service, and initial certificate tasks
- Restore TAP and bridge attachment after OpenVPN restarts
- Remove bundled server certificate and private key
This commit is contained in:
2026-11-27 17:58:46 +01:00
parent 36d2845a3a
commit 4b8e7f3592
35 changed files with 1322 additions and 303 deletions
+17 -5
View File
@@ -1,6 +1,18 @@
---
openvpn_pki_jwt_directory: /etc/vault-jwt
openvpn_pki_jwt_private_key_path: "{{ openvpn_pki_jwt_directory }}/private.pem"
openvpn_pki_jwt_public_key_path: "{{ openvpn_pki_jwt_directory }}/public.pem"
openvpn_pki_jwt_rsa_bits: 3072
openvpn_pki_public_key_artifact_directory: "{{ playbook_dir }}/../artifacts/openvpn-pki-public-keys"
openvpn_pki_bao_addr: "https://10.1.0.101:30200"
openvpn_pki_bao_cacert: /root/openbao-ca.crt
openvpn_pki_deployed_ca_source: "{{ openvpn_pki_certificate_dir }}/ca.crt"
openvpn_pki_sign_endpoint: vpn-Intermediate-pki/sign/vpn-servers
openvpn_pki_certificate_ttl: 1128h
openvpn_pki_certificate_dir: "{{ openvpn_cert_dir | default('/etc/openvpn/certs') }}"
openvpn_pki_certificate_common_name: "{{ inventory_hostname }}"
openvpn_pki_certificate_dns_sans: []
openvpn_pki_certificate_rsa_bits: 4096
openvpn_pki_expected_issuer: ""
openvpn_pki_require_server_auth_eku: true
openvpn_pki_renew_before_days: 15
openvpn_pki_working_directory: "{{ openvpn_pki_certificate_dir }}/.pki-work"
openvpn_pki_script_directory: /usr/local/libexec/openvpn-pki
openvpn_pki_config_path: /etc/openvpn/openbao-vpn.conf
openvpn_pki_service: "{{ openvpn_service | default('openvpn@server.service') }}"