pub struct SecretConsumer {
pub workload: String,
pub tenant: TenantId,
pub namespace: NamespaceId,
pub recipe: Option<RecipeIdentity>,
}Expand description
The identity a cluster-secret access rule is evaluated against: the requesting workload, as yubaba knows it at mount time.
Built from a WorkloadSpec via SecretConsumer::of. These three fields
are the whole vocabulary because they are the whole identity available at the
enforcement point — yubaba resolves secrets while holding a spec, with no
cheers principal and no spec→principal mapping in reach.
Fields§
§workload: StringWorkloadSpec::name — the DNS-friendly workload name.
tenant: TenantIdWorkloadSpec::tenant — the isolation axis (W206).
namespace: NamespaceIdWorkloadSpec::namespace — the routing/naming axis (W206).
recipe: Option<RecipeIdentity>The signed recipe this run was admitted as, when it carried a grant that
verified (R555-F5). None for every ordinary service workload, and
for any spec whose grant did not verify — see RecipeIdentity.
Implementations§
Source§impl SecretConsumer
impl SecretConsumer
Sourcepub fn of(spec: &WorkloadSpec) -> Self
pub fn of(spec: &WorkloadSpec) -> Self
The consumer identity of spec.
Carries no recipe identity: this constructor sees only the spec, and a
recipe identity is a claim about a signature. Add one with
SecretConsumer::admitted_as after verifying.
Sourcepub fn admitted_as(self, recipe: RecipeIdentity) -> Self
pub fn admitted_as(self, recipe: RecipeIdentity) -> Self
Attach the recipe identity a verified admission grant established.
Trait Implementations§
Source§impl Clone for SecretConsumer
impl Clone for SecretConsumer
Source§fn clone(&self) -> SecretConsumer
fn clone(&self) -> SecretConsumer
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 SecretConsumer
impl Debug for SecretConsumer
Source§impl<'de> Deserialize<'de> for SecretConsumer
impl<'de> Deserialize<'de> for SecretConsumer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for SecretConsumer
Source§impl PartialEq for SecretConsumer
impl PartialEq for SecretConsumer
Source§impl Serialize for SecretConsumer
impl Serialize for SecretConsumer
impl StructuralPartialEq for SecretConsumer
Auto Trait Implementations§
impl Freeze for SecretConsumer
impl RefUnwindSafe for SecretConsumer
impl Send for SecretConsumer
impl Sync for SecretConsumer
impl Unpin for SecretConsumer
impl UnsafeUnpin for SecretConsumer
impl UnwindSafe for SecretConsumer
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,
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§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.