pub struct ProjectAttestation { /* private fields */ }Expand description
A project id whose provenance is cryptographic, ready to stamp onto a
GatePrincipal with GatePrincipal::with_project.
Cross-crate sealing is not possible here: the daemon (another crate)
is what verifies the sources, so this constructor has to be public.
The guard is therefore by construction path, not by the compiler: the
daemon’s VerifiedProject::attest is the only caller, a ClaimedProject
has no route to it, and package I adds a grep test that no other site
calls ProjectAttestation::from_verified. A same-uid process can still
claim a project over the socket; this is an isolation guard between one
user’s projects, not a boundary against a hostile local process.
Implementations§
Source§impl ProjectAttestation
impl ProjectAttestation
Sourcepub fn from_verified(
project_id: impl Into<String>,
source: AttestSource,
) -> Self
pub fn from_verified( project_id: impl Into<String>, source: AttestSource, ) -> Self
Wrap a project id the caller has ALREADY verified from source.
Never call this with a client-supplied Request.project.
Sourcepub fn project_id(&self) -> &str
pub fn project_id(&self) -> &str
The verified project id.
Sourcepub fn source(&self) -> AttestSource
pub fn source(&self) -> AttestSource
Which verified source produced it.
Trait Implementations§
Source§impl Clone for ProjectAttestation
impl Clone for ProjectAttestation
Source§impl Debug for ProjectAttestation
impl Debug for ProjectAttestation
impl Eq for ProjectAttestation
Source§impl PartialEq for ProjectAttestation
impl PartialEq for ProjectAttestation
impl StructuralPartialEq for ProjectAttestation
Auto Trait Implementations§
impl Freeze for ProjectAttestation
impl RefUnwindSafe for ProjectAttestation
impl Send for ProjectAttestation
impl Sync for ProjectAttestation
impl Unpin for ProjectAttestation
impl UnsafeUnpin for ProjectAttestation
impl UnwindSafe for ProjectAttestation
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
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§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