pub struct TaskControlDescriptorV1 {Show 15 fields
pub schema_version: u32,
pub sender: String,
pub recipient: String,
pub tenant_id: String,
pub project_id: String,
pub action: String,
pub task_id: String,
pub task_descriptor_digest: String,
pub issued_at: UtcDateTime,
pub expires_at: UtcDateTime,
pub nonce: String,
pub reason: Option<String>,
pub grant_ref: CapabilityGrantRefV1,
pub key_id: String,
pub signature: String,
}Expand description
Signed control operation (tasks/get, tasks/cancel) against one existing
task.
Deliberately a sibling of TaskDescriptorV1 rather than an extension of
it: the send signing transcript is derived from the send fields, so adding a
target-task field there would either change the deployed V1 send signature
or leave the new field unsigned and forgeable. This type carries its own
signing domain, so a send signature can never be replayed as a control
signature nor the reverse.
Verifying this descriptor authorizes the operation, never the target. It
proves the sender holds a live, unrevoked grant for this action in this
scope; it does not prove the sender owns task_id. Before disclosing or
mutating a task the receiver must additionally compare the persisted owner
(super::Task::from_agent) against sender, the persisted scope against
tenant_id/project_id, and the persisted descriptor digest against
task_descriptor_digest, and must answer a mismatch indistinguishably from
an unknown task id so that no cross-tenant existence oracle appears.
Fields§
§schema_version: u32§sender: String§recipient: String§tenant_id: String§project_id: String§action: String§task_id: String§task_descriptor_digest: String§issued_at: UtcDateTime§expires_at: UtcDateTime§nonce: String§reason: Option<String>§grant_ref: CapabilityGrantRefV1§key_id: String§signature: StringImplementations§
Source§impl TaskControlDescriptorV1
impl TaskControlDescriptorV1
pub fn new( sender: &str, recipient: &str, tenant_id: &str, project_id: &str, action: &str, task_id: &str, task_descriptor_digest: &str, issued_at: UtcDateTime, expires_at: UtcDateTime, nonce: &str, reason: Option<&str>, grant_id: &str, key_id: &str, ) -> TaskControlDescriptorV1
Sourcepub fn sign(&mut self, signing_key: &SigningKey)
pub fn sign(&mut self, signing_key: &SigningKey)
Bind every authority-relevant field, including the target task id and the digest of the task’s original descriptor, to an Ed25519 signature.
Sourcepub fn signing_bytes(&self) -> Vec<u8> ⓘ
pub fn signing_bytes(&self) -> Vec<u8> ⓘ
Deterministic signing transcript: the control domain tag followed by
canonical JSON of the descriptor with an empty signature field.
The domain tag differs from TASK_DESCRIPTOR_SIGNING_DOMAIN, so the
two transcripts are disjoint even if their canonical bodies were made to
collide.
Sourcepub fn content_digest(&self) -> String
pub fn content_digest(&self) -> String
Digest of the signed content, excluding the signature itself. Used to dedupe a replayed control operation and to bind a response to the request it answers.
pub fn validate_shape(&self) -> Result<(), TaskAuthorityError>
Fail-closed authority check for a control operation, performed before any task lookup.
Identical in strictness to the send path — same peer resolution, same
revocation, agent, scope, skew, TTL, grant-window and never-outlive-the-
grant rules — with a tighter maximum lifetime and its own signing
transcript. Because the grant is matched on action, a peer holding
only a tasks/send grant is never authorized for tasks/get or
tasks/cancel.
Returning Ok(()) does not establish ownership of task_id; see the
type-level documentation for the owner, scope and digest comparison the
receiver still owes before any disclosure or mutation.
Trait Implementations§
Source§impl Clone for TaskControlDescriptorV1
impl Clone for TaskControlDescriptorV1
Source§fn clone(&self) -> TaskControlDescriptorV1
fn clone(&self) -> TaskControlDescriptorV1
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 TaskControlDescriptorV1
impl Debug for TaskControlDescriptorV1
Source§impl<'de> Deserialize<'de> for TaskControlDescriptorV1
impl<'de> Deserialize<'de> for TaskControlDescriptorV1
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaskControlDescriptorV1, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaskControlDescriptorV1, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for TaskControlDescriptorV1
Source§impl PartialEq for TaskControlDescriptorV1
impl PartialEq for TaskControlDescriptorV1
Source§impl Serialize for TaskControlDescriptorV1
impl Serialize for TaskControlDescriptorV1
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for TaskControlDescriptorV1
Auto Trait Implementations§
impl Forget for TaskControlDescriptorV1
impl Freeze for TaskControlDescriptorV1
impl Move for TaskControlDescriptorV1
impl RefUnwindSafe for TaskControlDescriptorV1
impl Send for TaskControlDescriptorV1where
RawVecInner: Send,
impl Sync for TaskControlDescriptorV1where
RawVecInner: Sync,
impl Unpin for TaskControlDescriptorV1
impl UnsafeUnpin for TaskControlDescriptorV1
impl UnwindSafe for TaskControlDescriptorV1where
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more