gleep fixes mtls and stuff

This commit is contained in:
boris committed 2026-04-18 18:17:29 +01:00
1 parent 31b726b439
commit 779db4cd94
16 files changed
+526 -45

No files matched your search

+9 -1
View File
@@ -107,7 +107,15 @@ class SSHCertificateAuthority(models.Model):
self.revoked_at = timezone.now()
def get_private_key(self) -> str:
file_payload = read_secret_ref(self.private_key, label="User CA private key")
try:
file_payload = read_secret_ref(self.private_key, label="User CA private key")
except RuntimeError as exc:
# Recover gracefully when a secret-file reference points to a
# deleted key file (for example after volume resets).
if "file missing:" in str(exc):
file_payload = ""
else:
raise
if file_payload:
return file_payload
inline_payload = (self.private_key or "").strip()