Revoke leases by operator-held lease id
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

session revoke accepts exactly one of --accessor-file or --lease-id-file.
Lease ids are read from a mode-0600 out-of-repo file and fingerprinted in
evidence; the handle is never printed. Production remains fail-closed.

Assistant: grok
Assistant-Session: 01a05f07-ae72-7781-9fcb-19efd61add00
This commit is contained in:
tegwick 2026-09-02 10:08:33 +02:00
parent ce1790f267
commit 85d4548035
7 changed files with 100 additions and 24 deletions

View file

@ -353,6 +353,12 @@ class OpenBaoClient:
raise BackendError("token accessor is missing or invalid")
self._run_ok(["token", "revoke", "-accessor", accessor])
def revoke_lease(self, lease_id: str) -> None:
"""Revoke a lease the operator already holds, by lease id only."""
if not lease_id or any(ch.isspace() for ch in lease_id):
raise BackendError("lease id is missing or invalid")
self._run_ok(["lease", "revoke", lease_id])
def _parse_wrap_response(self, stdout: str, *, ttl: str, creation_path: str) -> WrappedResponse:
try:
payload = json.loads(stdout)