pub enum SvidResponse {
X509 {
spiffe_id: String,
cert_chain: Vec<Vec<u8>>,
private_key: Zeroizing<Vec<u8>>,
bundle: Vec<Vec<u8>>,
expires_at: u64,
},
Jwt {
spiffe_id: String,
token: String,
expires_at: u64,
},
}Expand description
SVID type returned by the Workload API.
Does not derive Debug: X509::private_key holds the workload’s raw
private key and Jwt::token holds a bearer credential; a derived
Debug would print either verbatim on any accidental {:?}. The
manual impl below redacts both.
Does not derive Serialize/Deserialize either, for the same reason:
a derived Serialize would write the private key or bearer token
verbatim into any JSON/CBOR/etc. produced from this type. Nothing in
this crate persists an SvidResponse – the Workload API client below
only ever holds SVIDs in an in-memory cache and re-issues them from the
CA/JWT signer on expiry/restart, matching the standing rule that
re-derivable secret material should not be persisted beyond the current
work. A consumer with a genuine need to persist an SVID should build
its own explicit, reviewed representation rather than rely on a derive
that would silently include the raw key or token.
Variants§
Trait Implementations§
Source§impl Clone for SvidResponse
impl Clone for SvidResponse
Auto Trait Implementations§
impl Forget for SvidResponse
impl Freeze for SvidResponse
impl RefUnwindSafe for SvidResponse
impl Send for SvidResponse
impl Sync for SvidResponse
impl Unpin for SvidResponse
impl UnsafeUnpin for SvidResponse
impl UnwindSafe for SvidResponse
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
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