cli
Module: spec::cli
Section titled “Module: spec::cli”Contents
Section titled “Contents”Structs
CliIntegrationSpec- A CLI integration configuration that has passed cross-field validation.CliIntegrationSpecParams- Named inputs for constructing a validated [CliIntegrationSpec].CommandAndMatcher- A sensitive command pattern together with its extraction and outputCommandPattern- Command words and the rule for matching trailing positional arguments.
Enums
CliIntegrationConfigError- Error returned when validating a [CliSecretProviderConfig].
Type Aliases
CliMatcherRule- A command-classification rule for a CLI secret provider.
firma_secret_provider::spec::cli::CliIntegrationConfigError
Section titled “firma_secret_provider::spec::cli::CliIntegrationConfigError”Enum
Error returned when validating a [CliSecretProviderConfig].
Variants:
InvalidBinaryName{ source: crate::broker::BinaryNameError }- The executable name is not one portable path component.EmptyOptionName- An option has no spelling.EmptyArgv- A command has no args.AttachedValueWithoutValue{ name: String }- An option permits an attached value but does not take a value.ConflictingOptionDefinition{ name: String }- One option spelling has conflicting arity or attachment definitions.
Traits: Eq
Trait Implementations:
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Error
fn source(self: &Self) -> ::core::option::Option<&dyn ::thiserror::__private21::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
- Clone
fn clone(self: &Self) -> Self
firma_secret_provider::spec::cli::CliIntegrationSpec
Section titled “firma_secret_provider::spec::cli::CliIntegrationSpec”Struct
A CLI integration configuration that has passed cross-field validation.
The portable executable basename invariant, plus cross-field checks (empty
names, allow_attached_value
without takes_value, conflicting [FlagSpec] definitions across
stripped_options / forbidden_options / per-command stripped_options),
are enforced by [Self::new] and the TryFrom<CliSecretProviderConfig> impl
before this type is constructed.
Direct field construction outside this crate is not permitted.
Generic Parameters:
- Matcher
Methods:
fn new(params: CliIntegrationSpecParams<Matcher>) -> Result<Self, CliIntegrationConfigError>- Validated constructor.fn binary_name(self: &Self) -> &str- Returns the executable basename used to select this integration.fn provider_id(self: &Self) -> &str- Returns the stable provider identifier recorded for extracted secrets.fn credential_env_vars(self: &Self) -> &[String]- Returns the environment variables forwarded to authenticate the CLI.fn matchers(self: &Self) -> &[CliMatcherRule<Matcher>]- Returns the matcher rules.fn resolve_args(self: &Self, args: &[String]) -> MatchingResolution<Matcher>- Classifies an invocation as sensitive, safe to pass through, orfn rewrite_args(self: &Self, args: &[String]) -> Vec<String>- Normalizes a sensitive command’s output options. Forbidden options are
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- TryFrom
fn try_from(config: CliSecretProviderConfig) -> Result<Self, <Self as >::Error>
firma_secret_provider::spec::cli::CliIntegrationSpecParams
Section titled “firma_secret_provider::spec::cli::CliIntegrationSpecParams”Struct
Named inputs for constructing a validated [CliIntegrationSpec].
Generic Parameters:
- Matcher
Fields:
binary_name: String- Executable basename used to select this integration.provider_id: String- Stable identifier recorded for secrets from this integration.credential_env_vars: Vec<String>- Environment variables forwarded to authenticate the provider CLI.stripped_options: Vec<firma_config_schema::secret_provider::cli::FlagSpec>- Integration-wide options ignored while identifying command words.forbidden_options: Vec<firma_config_schema::secret_provider::cli::FlagSpec>- Options that make an invocation unsafe.matchers: Vec<CliMatcherRule<Matcher>>- Rules that classify invocations and configure secret extraction.
Traits: Eq
Trait Implementations:
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_secret_provider::spec::cli::CliMatcherRule
Section titled “firma_secret_provider::spec::cli::CliMatcherRule”Type Alias: super::MatcherRule<CommandAndMatcher<Matcher>, CommandPattern>
A command-classification rule for a CLI secret provider.
firma_secret_provider::spec::cli::CommandAndMatcher
Section titled “firma_secret_provider::spec::cli::CommandAndMatcher”Struct
A sensitive command pattern together with its extraction and output normalization policy.
Generic Parameters:
- Matcher
Fields:
command: CommandPattern- Pattern used to identify the command.matcher: Matcher- Matcher used to extract secrets from the normalized output.stripped_options: Vec<firma_config_schema::secret_provider::cli::FlagSpec>- Output-shaping options skipped during matching and removed beforeappend_options: Vec<String>- Options and values added to normalize output into the expected form.
Traits: Eq
Trait Implementations:
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private229::Result<Self, <__D as >::Error>
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
firma_secret_provider::spec::cli::CommandPattern
Section titled “firma_secret_provider::spec::cli::CommandPattern”Struct
Command words and the rule for matching trailing positional arguments.
Fields:
argv: crate::NonEmptyVec<String>- Command words, excluding the binary name.match_kind: firma_config_schema::secret_provider::cli::CommandMatch- Whether trailing positional arguments are accepted.
Methods:
fn prefix(argv: NonEmptyVec<String>) -> Self- Creates a pattern that accepts trailing positional arguments.fn exact(argv: NonEmptyVec<String>) -> Self- Creates a pattern that accepts only the listed command words.
Traits: Eq
Trait Implementations:
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private229::Result<Self, <__D as >::Error>
- Clone
fn clone(self: &Self) -> Self
- PartialEq
fn eq(self: &Self, other: &Self) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result