Broker audit-core dynamic database credentials
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

This commit is contained in:
codex 2026-08-10 19:36:30 +02:00
parent d140e829eb
commit 9f6bdffec4
5 changed files with 245 additions and 12 deletions

View file

@ -50,6 +50,14 @@ def sample_grant() -> dict:
class CredentialHelperTests(unittest.TestCase):
def test_database_credential_response_is_parsed_without_emission(self) -> None:
lease_id, username, password = credential.parse_database_credential(
'{"lease_id":"database/creds/runtime/lease-1","data":{"username":"leased-user","password":"leased-secret"}}'
)
self.assertEqual(lease_id, "database/creds/runtime/lease-1")
self.assertEqual(username, "leased-user")
self.assertEqual(password, "leased-secret")
def test_ttl_over_max_is_rejected(self) -> None:
with self.assertRaises(SystemExit):
credential.validate_issue_request(