feat: admit existing OpenBao catalog lanes
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s

This commit is contained in:
tegwick 2026-08-21 08:20:33 +02:00
parent 9d383442c8
commit 784be978bf
29 changed files with 1490 additions and 79 deletions

View file

@ -52,6 +52,10 @@ def resolve_npm_token_env(entry: CatalogEntry, *, policy_dir=None) -> str:
def _fetch_value(client: OpenBaoClient, entry: CatalogEntry, field: str) -> str:
"""Read the field value via an approle-scoped token. Held in memory only."""
if entry.delivery_auth_method != "approle" or not entry.has_delivery_auth:
raise DeliveryError(
f"lane '{entry.id}' has no AppRole delivery auth for native exec"
)
try:
token = client.approle_login_token(entry.role_name)
except Exception as e:
@ -126,6 +130,10 @@ def exec_with_secret(
"""
if not command:
raise DeliveryError("no command given to exec")
if field not in entry.fields:
raise DeliveryError(
f"field '{field}' not declared in lane '{entry.id}' fields {entry.fields}"
)
declared = set(entry.delivery_modes)
if mode == "auto":