#[non_exhaustive]pub enum PolicyError {
InvalidConfiguration(String),
MissingIdentityClaim {
claim: &'static str,
},
MalformedIdentityClaim {
claim: &'static str,
reason: String,
},
IssuerMismatch {
expected: String,
found: String,
},
SourceRepositoryMismatch {
expected: String,
found: String,
},
SourceOwnerIdMismatch {
expected: String,
found: String,
},
SourceRepositoryIdMismatch {
expected: String,
found: String,
},
SourceRefMismatch {
expected: String,
found: String,
},
SourceCommitMismatch {
expected: String,
found: String,
},
SignerRepositoryMismatch {
expected: String,
found: String,
},
SignerWorkflowPathMismatch {
expected: String,
found: String,
},
SignerRevisionMismatch {
expected: String,
found: String,
},
}Expand description
The caller-supplied identity policy was not satisfied.
Matching (crate::policy_match) never infers what a mismatch might
mean; every variant below names exactly which comparison failed, and
(where applicable) carries the expected policy value alongside the
found authenticated certificate value (DESIGN.md “Core decisions”
item 8).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidConfiguration(String)
A policy builder was given an empty or malformed value.
MissingIdentityClaim
A Fulcio identity claim needed to evaluate the policy was absent from the certificate (its extension was not present).
MalformedIdentityClaim
A Fulcio identity claim was present but not in the shape this crate
requires to evaluate policy (e.g. the source repository URI or the
SAN URI did not match the expected https://github.com/... shape).
Fields
IssuerMismatch
The certificate’s authenticated OIDC issuer did not match the pinned GitHub Actions issuer.
Fields
SourceRepositoryMismatch
The certificate’s authenticated source repository (owner/name)
did not match the policy’s required source repository.
Fields
SourceOwnerIdMismatch
The certificate’s authenticated source repository owner id did not match the policy’s pinned owner id.
Fields
SourceRepositoryIdMismatch
The certificate’s authenticated source repository id did not match the policy’s pinned repository id.
Fields
SourceRefMismatch
The certificate’s authenticated source ref did not satisfy the
policy’s ref requirement (Exact or Glob).
Fields
SourceCommitMismatch
The certificate’s authenticated source commit did not match the policy’s required commit.
Fields
SignerRepositoryMismatch
The certificate’s authenticated signer-workflow repository
(owner/name) did not match the policy’s required repository.
Fields
SignerWorkflowPathMismatch
The certificate’s authenticated signer-workflow path did not match the policy’s required path.
Fields
SignerRevisionMismatch
The certificate’s authenticated signer-workflow revision did not
satisfy the policy’s revision requirement (Ref or Sha).
Trait Implementations§
Source§impl Debug for PolicyError
impl Debug for PolicyError
Source§impl Display for PolicyError
impl Display for PolicyError
Source§impl Error for PolicyError
impl Error for PolicyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()