pub enum CredentialShape {
MintAndRevoke,
MintExpiryOnly,
RefreshBroker,
StaticCustody,
Federation,
}Expand description
Which of the five delegation shapes an engine implements. The shape is the
single most useful thing to know about a credential, because it says what a
lease can actually promise — see docs/delegation/README.md.
Variants§
MintAndRevoke
A — minted on demand and destroyed on demand. A lease means what it says.
MintExpiryOnly
B — minted on demand, but the provider cannot un-mint it. TTL is the
only containment, and revoke() is advisory.
RefreshBroker
C — the durable half stays here, only a short access token is handed out.
StaticCustody
D — nothing is mintable; this is encrypted custody plus rotation.
Federation
E — no credential exists anywhere; the consumer’s own identity is trusted.
Implementations§
Source§impl CredentialShape
impl CredentialShape
Sourcepub fn revocable(self) -> bool
pub fn revocable(self) -> bool
Whether revoking the lease destroys the credential the consumer
received. That is the only question a consumer is actually asking, and
answering it narrowly keeps the _doc block honest.
Only shape A can say yes. A refresh broker can kill the durable half — which stops future issuance — but the access token already handed out lives until it expires, so from the consumer’s point of view its lease is not revocable either.