fix(security): scope row locks and add explicit expiry recovery

This commit is contained in:
2026-11-20 19:51:42 +03:00
parent 93e5a915d5
commit 5c91f605fb
12 changed files with 193 additions and 26 deletions
+5 -4
View File
@@ -161,7 +161,7 @@ def reload_bao():
raise TimeoutError("Verified Bao restart/unseal unavailable: " + str(last))
def recover_bao():
def recover_bao(*, all_roles=True):
# Explicit operator recovery after the server leaf itself has expired.
key, root = ca()
leaf_key, leaf = sign_leaf(
@@ -184,9 +184,10 @@ def recover_bao():
operator = Operator()
try:
operator.unseal()
for role in ROLES:
if role != "migrate":
repair(operator, role)
if all_roles:
for role in ROLES:
if role != "migrate":
repair(operator, role)
finally:
operator.close()