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.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:
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, Error
Trait Implementations:
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
- Clone
fn clone(self: &Self) -> CliIntegrationConfigError
- PartialEq
fn eq(self: &Self, other: &CliIntegrationConfigError) -> bool
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
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.
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(binary_name: String, provider_id: String, credential_env_vars: Vec<String>, stripped_options: Vec<FlagSpec>, forbidden_options: Vec<FlagSpec>, matchers: Vec<CliMatcherRule<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:
- TryFrom
fn try_from(config: CliSecretProviderConfig) -> Result<Self, <Self as >::Error>
- Clone
fn clone(self: &Self) -> CliIntegrationSpec<Matcher>
- PartialEq
fn eq(self: &Self, other: &CliIntegrationSpec<Matcher>) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::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::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:
- Clone
fn clone(self: &Self) -> CommandAndMatcher<Matcher>
- PartialEq
fn eq(self: &Self, other: &CommandAndMatcher<Matcher>) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Deserialize
fn deserialize<__D>(__deserializer: __D) -> _serde::__private228::Result<Self, <__D as >::Error>
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::non_empty::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::__private228::Result<Self, <__D as >::Error>
- Clone
fn clone(self: &Self) -> CommandPattern
- PartialEq
fn eq(self: &Self, other: &CommandPattern) -> bool
- Serialize
fn serialize<__S>(self: &Self, __serializer: __S) -> _serde::__private228::Result<<__S as >::Ok, <__S as >::Error>
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result