CompiledMatcher
Module: matcher::CompiledMatcher
Section titled “Module: matcher::CompiledMatcher”Contents
Section titled “Contents”Functions
rewrite- Extract secrets fromoutputand return it rewritten with placeholders.
firma_secret_provider::matcher::CompiledMatcher::rewrite
Section titled “firma_secret_provider::matcher::CompiledMatcher::rewrite”Function
Extract secrets from output and return it rewritten with placeholders.
mint(name, value, domains, item) -> placeholder is invoked once per
extracted secret:
name: field label (always present).value: plaintext secret.domains: hostname scopes whendomain_selectoris configured, else empty. A secret may legitimately be scoped to more than one host (e.g. adomain_selectormatching several URLs on the same vault item), so all of them are passed through; an empty set means the secret is unscoped and resolves for any host.item: item title whenitem_selectoris configured, elseNone.
The caller mints and stores the placeholder → value mapping and returns
the placeholder to substitute in place of the value.
Errors
Section titled “Errors”Returns [MatcherError] if the output does not match the matcher’s shape
(bad JSON / UTF-8, non-string or misaligned nodes) or re-serialization
fails.
fn rewrite<impl FnMut(String, SecretString, HashSet<Authority>, Option<String>) -> SecretPlaceholder>(self: &Self, output: &[u8], mint: & mut impl Trait) -> Result<Vec<u8>, MatcherError>