pub struct OrgPolicyVerifyResponseV1 {
pub schema: String,
pub request_digest: RecordDigest,
pub organization_id: TeamId,
pub artifact_digest: ContentDigest,
pub trust_digest: Option<ContentDigest>,
pub marker_digest: Option<ContentDigest>,
pub nonce: NonceDigest,
pub answered_at: TeamTimestampV1,
pub verifier_key_id: KeyId,
pub outcome: OrgPolicyVerifyOutcomeV1,
}Expand description
The verifier’s answer, bound to the request it answers.
Fields§
§schema: String§request_digest: RecordDigest§organization_id: TeamId§artifact_digest: ContentDigest§trust_digest: Option<ContentDigest>§marker_digest: Option<ContentDigest>§nonce: NonceDigest§answered_at: TeamTimestampV1§verifier_key_id: KeyId§outcome: OrgPolicyVerifyOutcomeV1Implementations§
Source§impl OrgPolicyVerifyResponseV1
impl OrgPolicyVerifyResponseV1
pub fn validate(&self) -> Result<(), ValidationError>
pub fn canonical_bytes(&self) -> Result<Vec<u8>, ValidationError>
Sourcepub fn signing_bytes(&self) -> Result<Vec<u8>, ValidationError>
pub fn signing_bytes(&self) -> Result<Vec<u8>, ValidationError>
The bytes the verifier signs and the endpoint verifies.
Sourcepub fn binds(
&self,
request: &OrgPolicyVerifyRequestV1,
now: &TeamTimestampV1,
) -> Result<(), ValidationError>
pub fn binds( &self, request: &OrgPolicyVerifyRequestV1, now: &TeamTimestampV1, ) -> Result<(), ValidationError>
Refuses unless this is the answer to request, given in time.
Every bound element must match: the request digest, the organization,
the three snapshot digests and the nonce. The answer must lie inside
the request’s window, and now must be neither before the answer nor
past the deadline (the caller keeps its own clock and deadline
monotonic; this check cannot). An Enforce finding is additionally
refused at or after its valid_until. A match
says nothing about who answered: the signature and the verifier’s
registration are the caller’s to check.
Trait Implementations§
Source§impl Clone for OrgPolicyVerifyResponseV1
impl Clone for OrgPolicyVerifyResponseV1
Source§impl Debug for OrgPolicyVerifyResponseV1
impl Debug for OrgPolicyVerifyResponseV1
Source§impl<'de> Deserialize<'de> for OrgPolicyVerifyResponseV1
impl<'de> Deserialize<'de> for OrgPolicyVerifyResponseV1
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OrgPolicyVerifyResponseV1
impl StructuralPartialEq for OrgPolicyVerifyResponseV1
Auto Trait Implementations§
impl Forget for OrgPolicyVerifyResponseV1
impl Freeze for OrgPolicyVerifyResponseV1
impl Move for OrgPolicyVerifyResponseV1
impl RefUnwindSafe for OrgPolicyVerifyResponseV1
impl Send for OrgPolicyVerifyResponseV1
impl Sync for OrgPolicyVerifyResponseV1
impl Unpin for OrgPolicyVerifyResponseV1
impl UnsafeUnpin for OrgPolicyVerifyResponseV1
impl UnwindSafe for OrgPolicyVerifyResponseV1
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
Mutably borrows from an owned value. Read more