pub struct GlovesConfig {
pub source_path: PathBuf,
pub root: PathBuf,
pub private_paths: BTreeMap<String, PathBuf>,
pub daemon: DaemonBootstrapConfig,
pub vault: VaultBootstrapConfig,
pub defaults: DefaultBootstrapConfig,
pub agents: BTreeMap<String, AgentAccessPolicy>,
pub secret_access: BTreeMap<String, SecretAccessPolicy>,
pub agent_vault_access: BTreeMap<String, AgentVaultAccessPolicy>,
pub integrations: BTreeMap<String, IntegrationConfig>,
pub secret_pipe_commands: BTreeMap<String, SecretPipeCommandPolicy>,
}Expand description
Effective and validated .gloves.toml configuration.
Fields§
§source_path: PathBufAbsolute config file path.
root: PathBufEffective runtime root.
private_paths: BTreeMap<String, PathBuf>Private path aliases resolved to absolute paths.
daemon: DaemonBootstrapConfigEffective daemon defaults.
vault: VaultBootstrapConfigEffective vault mode.
defaults: DefaultBootstrapConfigEffective global defaults.
agents: BTreeMap<String, AgentAccessPolicy>Agent access policies.
secret_access: BTreeMap<String, SecretAccessPolicy>Agent secret ACL policies.
agent_vault_access: BTreeMap<String, AgentVaultAccessPolicy>Agent vault access policies.
integrations: BTreeMap<String, IntegrationConfig>Configured integrations.
secret_pipe_commands: BTreeMap<String, SecretPipeCommandPolicy>Per-command secret pipe policies.
Implementations§
Source§impl GlovesConfig
impl GlovesConfig
Sourcepub fn load_from_path(
path: impl AsRef<Path>,
) -> Result<GlovesConfig, GlovesError>
pub fn load_from_path( path: impl AsRef<Path>, ) -> Result<GlovesConfig, GlovesError>
Loads and validates a config file from disk.
Sourcepub fn parse_from_str(
raw: &str,
source_path: impl AsRef<Path>,
) -> Result<GlovesConfig, GlovesError>
pub fn parse_from_str( raw: &str, source_path: impl AsRef<Path>, ) -> Result<GlovesConfig, GlovesError>
Parses and validates config from TOML text.
Sourcepub fn agent_paths(
&self,
agent: &AgentId,
) -> Result<Vec<ResolvedAgentPathAccess>, GlovesError>
pub fn agent_paths( &self, agent: &AgentId, ) -> Result<Vec<ResolvedAgentPathAccess>, GlovesError>
Returns resolved private-path visibility for one agent.
Sourcepub fn has_secret_acl(&self) -> bool
pub fn has_secret_acl(&self) -> bool
Returns true when the config enables per-agent secret ACLs.
Sourcepub fn secret_access_policy(
&self,
agent: &AgentId,
) -> Option<&SecretAccessPolicy>
pub fn secret_access_policy( &self, agent: &AgentId, ) -> Option<&SecretAccessPolicy>
Returns secret ACL policy for one agent.
Sourcepub fn agent_vault_access_policy(
&self,
agent: &AgentId,
) -> Option<&AgentVaultAccessPolicy>
pub fn agent_vault_access_policy( &self, agent: &AgentId, ) -> Option<&AgentVaultAccessPolicy>
Returns vault access policy for one agent.
Sourcepub fn vault_mount_path(&self, mount_name: &str) -> Option<&PathBuf>
pub fn vault_mount_path(&self, mount_name: &str) -> Option<&PathBuf>
Returns one configured vault mount path.
Sourcepub fn integration(&self, name: &str) -> Option<&IntegrationConfig>
pub fn integration(&self, name: &str) -> Option<&IntegrationConfig>
Returns one configured integration.
Sourcepub fn inferred_integration_refs(
&self,
name: &str,
) -> Result<Vec<String>, GlovesError>
pub fn inferred_integration_refs( &self, name: &str, ) -> Result<Vec<String>, GlovesError>
Returns inferred secret refs for one configured integration.
Sourcepub fn secret_pipe_command_policy(
&self,
command: &str,
) -> Option<&SecretPipeCommandPolicy>
pub fn secret_pipe_command_policy( &self, command: &str, ) -> Option<&SecretPipeCommandPolicy>
Returns secret pipe policy for one executable command.
Trait Implementations§
Source§impl Clone for GlovesConfig
impl Clone for GlovesConfig
Source§fn clone(&self) -> GlovesConfig
fn clone(&self) -> GlovesConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GlovesConfig
impl Debug for GlovesConfig
Source§impl<'de> Deserialize<'de> for GlovesConfig
impl<'de> Deserialize<'de> for GlovesConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GlovesConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GlovesConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for GlovesConfig
impl PartialEq for GlovesConfig
Source§impl Serialize for GlovesConfig
impl Serialize for GlovesConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for GlovesConfig
impl StructuralPartialEq for GlovesConfig
Auto Trait Implementations§
impl Freeze for GlovesConfig
impl RefUnwindSafe for GlovesConfig
impl Send for GlovesConfig
impl Sync for GlovesConfig
impl Unpin for GlovesConfig
impl UnsafeUnpin for GlovesConfig
impl UnwindSafe for GlovesConfig
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§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> 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