pub struct SecretInjector { /* private fields */ }Expand description
Client for injecting secrets into the TEE via RA-TLS.
Connects to the guest’s RA-TLS attestation server, verifies the TEE
during the TLS handshake, then sends secrets over the encrypted channel.
The guest stores secrets in /run/secrets/ (tmpfs) and optionally
sets them as environment variables.
Implementations§
Source§impl SecretInjector
impl SecretInjector
Sourcepub fn new(socket_path: &Path) -> Self
pub fn new(socket_path: &Path) -> Self
Create a new secret injector for the given attestation socket.
Sourcepub async fn inject(
&self,
secrets: &[SecretEntry],
policy: AttestationPolicy,
allow_simulated: bool,
) -> Result<SecretInjectionResult>
pub async fn inject( &self, secrets: &[SecretEntry], policy: AttestationPolicy, allow_simulated: bool, ) -> Result<SecretInjectionResult>
Inject secrets into the TEE via RA-TLS.
- Connects to the guest attestation server
- TLS handshake verifies the TEE (attestation in cert)
- Sends secrets over the verified encrypted channel (Frame protocol)
- Guest stores secrets in /run/secrets/ and sets env vars
§Arguments
secrets- List of secrets to injectpolicy- Attestation policy for TEE verificationallow_simulated- Whether to accept simulated TEE reports
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SecretInjector
impl RefUnwindSafe for SecretInjector
impl Send for SecretInjector
impl Sync for SecretInjector
impl Unpin for SecretInjector
impl UnsafeUnpin for SecretInjector
impl UnwindSafe for SecretInjector
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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