forked from mtusi2026/mtusi2026lab7
Implement lab 7 mTLS OpenBao and certificate rotation
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
"""Rotate leaf certificates while preserving the local trust anchor."""
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
certs = root / 'certs'
|
||||
for name in ('server', 'lb-client', 'api1', 'api2'):
|
||||
for suffix in ('.crt', '.key', '.pem'):
|
||||
path = certs / (name + suffix)
|
||||
if path.exists():
|
||||
path.unlink()
|
||||
subprocess.run(['python', str(root / 'scripts' / 'bootstrap.py')], check=True)
|
||||
print('Leaf certificates rotated; CA and application images were not replaced.')
|
||||
Reference in New Issue
Block a user