pub struct ExternalCredentialConsentToml {
pub access: ExternalCredentialAccess,
pub provider: String,
pub source: ExternalCredentialSource,
pub path: PathBuf,
pub consent_version: u32,
}Expand description
Persisted, provider-scoped consent for one exact external credential file.
Provider and source are repeated intentionally. A copied provider table or a future source-path remap must fail closed instead of inheriting authority.
Fields§
§access: ExternalCredentialAccess§provider: String§source: ExternalCredentialSource§path: PathBuf§consent_version: u32Implementations§
Source§impl ExternalCredentialConsentToml
impl ExternalCredentialConsentToml
pub fn read_only( provider: ProviderKind, source: ExternalCredentialSource, path: PathBuf, ) -> Self
Sourcepub fn validate_read_scope(
&self,
provider: ProviderKind,
source: ExternalCredentialSource,
resolved_path: &Path,
) -> Result<()>
pub fn validate_read_scope( &self, provider: ProviderKind, source: ExternalCredentialSource, resolved_path: &Path, ) -> Result<()>
Validate that this record is a current read-only consent for one exact provider/source/path tuple without minting an I/O capability.
This is intentionally side-effect free so inventory and picker surfaces can acknowledge dormant consent without inspecting the external file.
Sourcepub fn read_grant(
&self,
provider: ProviderKind,
source: ExternalCredentialSource,
resolved_path: &Path,
) -> Result<ExternalCredentialReadGrant>
pub fn read_grant( &self, provider: ProviderKind, source: ExternalCredentialSource, resolved_path: &Path, ) -> Result<ExternalCredentialReadGrant>
Validate and mint the read capability consumed by credential adapters. No filesystem operation occurs while validating the policy.
Trait Implementations§
Source§impl Clone for ExternalCredentialConsentToml
impl Clone for ExternalCredentialConsentToml
Source§fn clone(&self) -> ExternalCredentialConsentToml
fn clone(&self) -> ExternalCredentialConsentToml
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for ExternalCredentialConsentToml
impl<'de> Deserialize<'de> for ExternalCredentialConsentToml
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExternalCredentialConsentToml
impl StructuralPartialEq for ExternalCredentialConsentToml
Auto Trait Implementations§
impl Freeze for ExternalCredentialConsentToml
impl RefUnwindSafe for ExternalCredentialConsentToml
impl Send for ExternalCredentialConsentToml
impl Sync for ExternalCredentialConsentToml
impl Unpin for ExternalCredentialConsentToml
impl UnsafeUnpin for ExternalCredentialConsentToml
impl UnwindSafe for ExternalCredentialConsentToml
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,
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
Compare self to
key and return true if they are equal.