pub enum AuthorizationSummary {
Action {
action_type: String,
identity: String,
details: Vec<(String, String)>,
},
Commit {
message: String,
},
Opaque {
digest_hex: String,
},
}Expand description
What a signer is authorizing, derived from the exact bytes being signed.
Variants§
Action
A signed action request: the action, the signing identity, and the legible payload fields (e.g. an agent capability call’s capability, budget, and target).
Fields
Commit
A git commit’s message — the legible content being authorized. The commit’s git author
line is deliberately excluded: it is an unverified self-claim, and the authorizing identity
is always the verdict’s cryptographically-verified signer, never the git author.
Opaque
Signed bytes whose content is not legible from the signature (e.g. an artifact attestation binds a digest, not content). The digest is named so consent is never silently blank; content consent must be established out of band.
Implementations§
Source§impl AuthorizationSummary
impl AuthorizationSummary
Sourcepub fn from_signed_bytes(signed_bytes: &[u8]) -> Self
pub fn from_signed_bytes(signed_bytes: &[u8]) -> Self
Derive a legible summary from the exact bytes a signature will cover.
Recognizes a signed action request (canonical JSON with type/identity/payload) and
a git commit object; anything else is summarized by its SHA-256 digest rather than
silently shown as nothing.
Args:
signed_bytes: the bytes the signature covers.
Usage:
let summary = AuthorizationSummary::from_signed_bytes(&payload);
println!("Authorizing: {summary}");Trait Implementations§
Source§impl Clone for AuthorizationSummary
impl Clone for AuthorizationSummary
Source§fn clone(&self) -> AuthorizationSummary
fn clone(&self) -> AuthorizationSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthorizationSummary
impl Debug for AuthorizationSummary
Source§impl Display for AuthorizationSummary
impl Display for AuthorizationSummary
impl Eq for AuthorizationSummary
Source§impl PartialEq for AuthorizationSummary
impl PartialEq for AuthorizationSummary
impl StructuralPartialEq for AuthorizationSummary
Auto Trait Implementations§
impl Freeze for AuthorizationSummary
impl RefUnwindSafe for AuthorizationSummary
impl Send for AuthorizationSummary
impl Sync for AuthorizationSummary
impl Unpin for AuthorizationSummary
impl UnsafeUnpin for AuthorizationSummary
impl UnwindSafe for AuthorizationSummary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.