pub struct WorkloadCredential {
pub format: i32,
pub serialized: String,
pub credential_id: String,
pub key_id: String,
pub trust_bundle_version: String,
pub issued_at: Option<Timestamp>,
pub not_before: Option<Timestamp>,
pub expires_at: Option<Timestamp>,
pub renew_after: Option<Timestamp>,
pub binding_type: i32,
}Expand description
WorkloadCredential 是单个已认证 SDK/workload 的敏感数据面凭证。 serialized JWT 的必选 claims 为 iss/sub/aud/iat/nbf/exp/jti,以及 pole_ver、pole_trust_domain、pole_namespace、pole_service、 pole_identity_revision、pole_binding_type。只有验证过实例级 evidence 后 才允许包含 pole_workload_id。数据面使用保留 Header/metadata x-pole-workload-credential 携带,不能与 control-plane authorization 混用。
Fields§
§format: i32§serialized: Stringcompact JWT;任何读取本字段的路径都必须按 secret 处理。
credential_id: String§key_id: String§trust_bundle_version: String§issued_at: Option<Timestamp>§not_before: Option<Timestamp>§expires_at: Option<Timestamp>§renew_after: Option<Timestamp>§binding_type: i32Implementations§
Source§impl WorkloadCredential
impl WorkloadCredential
Sourcepub fn format(&self) -> WorkloadCredentialFormat
pub fn format(&self) -> WorkloadCredentialFormat
Returns the enum value of format, or the default if the field is set to an invalid enum value.
Sourcepub fn set_format(&mut self, value: WorkloadCredentialFormat)
pub fn set_format(&mut self, value: WorkloadCredentialFormat)
Sets format to the provided enum value.
Sourcepub fn binding_type(&self) -> WorkloadBindingType
pub fn binding_type(&self) -> WorkloadBindingType
Returns the enum value of binding_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_binding_type(&mut self, value: WorkloadBindingType)
pub fn set_binding_type(&mut self, value: WorkloadBindingType)
Sets binding_type to the provided enum value.
Trait Implementations§
Source§impl Clone for WorkloadCredential
impl Clone for WorkloadCredential
Source§impl Debug for WorkloadCredential
impl Debug for WorkloadCredential
Source§impl Default for WorkloadCredential
impl Default for WorkloadCredential
impl Eq for WorkloadCredential
Source§impl Hash for WorkloadCredential
impl Hash for WorkloadCredential
Source§impl Message for WorkloadCredential
impl Message for WorkloadCredential
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for WorkloadCredential
impl PartialEq for WorkloadCredential
impl StructuralPartialEq for WorkloadCredential
Auto Trait Implementations§
impl Freeze for WorkloadCredential
impl RefUnwindSafe for WorkloadCredential
impl Send for WorkloadCredential
impl Sync for WorkloadCredential
impl Unpin for WorkloadCredential
impl UnsafeUnpin for WorkloadCredential
impl UnwindSafe for WorkloadCredential
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
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
Compare self to
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request