pub struct HandleClaims {
pub handle_id: String,
pub connection_id: String,
pub tenant: String,
pub run_id: Option<String>,
pub scopes: BTreeSet<String>,
pub issued_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
}Expand description
The signed claims a CredentialHandle carries. Validity is
self-contained: expiry and the scope binding read from here, and only
the connection liveness check hits the store at resolution (the
design’s open question 5 leaning — “fails closed at the next tool
call” forbids caching revocation decisions). Journaled on issuance;
safe to journal throughout — claims name the connection and the
narrowed grant, never the bytes.
Fields§
§handle_id: StringThe handle id (hdl-{32 hex}).
connection_id: StringThe connection this handle resolves against.
tenant: StringThe tenant the handle was issued to. Bound in the claims (and covered by the signature) so a handle presented outside its tenant is a forgery, not a cross-tenant read.
run_id: Option<String>The run the handle was issued for, when the issuance was run-bound. The run’s evidence pins — through the issuance event — the connection id and the consent scope set it resolved; rotation beneath the stable connection id changes nothing pinned.
scopes: BTreeSet<String>The narrowed scope set: always a subset of the connection’s consent set at issuance (the whole set when the request asked for no narrowing). Resolution may check any subset of this set — the second, per-operation narrowing.
issued_at: DateTime<Utc>When the handle was issued.
expires_at: DateTime<Utc>When the handle stops resolving. Handles live for minutes and are never pinned anywhere.
Implementations§
Source§impl HandleClaims
impl HandleClaims
Sourcepub fn is_expired(&self, now: DateTime<Utc>) -> bool
pub fn is_expired(&self, now: DateTime<Utc>) -> bool
true at or past the expiry instant.