mirror of
https://scm.tikali.ai/tikali/applications/monky/monky-deployd.git
synced 2026-09-18 04:36:15 +00:00
Merge branch 'docs/dd-0524-0526-protocol-shapes' into 'main'
docs(protocol): AppRole divergence is resolved history; lease example + fake follow tenancy's AgentLeaseOut (DD-0524/DD-0526) See merge request tikali/applications/monky/monky-deployd!8
This commit is contained in:
@@ -4,7 +4,7 @@ Bearer = the agent's OpenBao token (from the `jwt-tenancy` login). Tenancy pins
|
||||
the token's `meta.env_id` (403 AGENT_ENV_MISMATCH -> exit 78, never retried) and refuses a token
|
||||
whose deploy grant was superseded (401 AGENT_UNAUTHENTICATED -> re-bootstrap or re-run the kit).
|
||||
|
||||
Lease shape of record (Gate 1 v2, 2026-09-05): `{login_jwt, ttl_s, mount, role, vault}`. An
|
||||
Lease shape of record (Gate 1 v2, 2026-09-05): `{env_id, login_jwt, ttl_s, mount, role, addr}`. An
|
||||
AppRole-era body (`wrapping_token`, `role_id`) is refused loudly — there is nothing to unwrap."""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -158,13 +158,15 @@ class TenancyClient:
|
||||
"(ADR-0028 amendment 2026-09-05)",
|
||||
)
|
||||
raise TenancyError(200, "LEASE_SHAPE", "lease response carries no login_jwt")
|
||||
# shape of record (tenancy AgentLeaseOut): `addr` is top-level; a pre-0.1.x `vault{}` object
|
||||
# is still read as a fallback so an older fake or tenancy does not break the lease
|
||||
v = js.get("vault") or {}
|
||||
return Lease(
|
||||
login_jwt=str(js["login_jwt"]),
|
||||
ttl_s=int(js.get("ttl_s") or 3600),
|
||||
mount=str(js.get("mount") or "jwt-tenancy"),
|
||||
role=str(js.get("role") or "see-env"),
|
||||
vault=Vault(addr=v.get("addr"), mount=v.get("mount"), prefix=v.get("prefix")),
|
||||
vault=Vault(addr=js.get("addr") or v.get("addr"), mount=v.get("mount"), prefix=v.get("prefix")),
|
||||
)
|
||||
|
||||
def report(
|
||||
|
||||
Reference in New Issue
Block a user