Class VerificationPolicy
- Namespace
- Sigstore.Verification
- Assembly
- Sigstore.dll
Immutable identity policy for Sigstore bundle verification.
public sealed record VerificationPolicy : IEquatable<VerificationPolicy>
- Inheritance
-
VerificationPolicy
- Implements
- Inherited Members
Constructors
VerificationPolicy(string, CertificateIdentityMatcher)
Creates a policy.
public VerificationPolicy(string expectedOidcIssuer, CertificateIdentityMatcher certificateIdentityMatcher)
Parameters
expectedOidcIssuerstringExpected OIDC issuer URI (from Fulcio extensions).
certificateIdentityMatcherCertificateIdentityMatcherMatcher for certificate identity (typically a SAN URI).
Properties
CertificateIdentityMatcher
Matcher applied to certificate identity material.
public CertificateIdentityMatcher CertificateIdentityMatcher { get; }
Property Value
ExpectedOidcIssuer
Expected OIDC issuer string (for example https://token.actions.githubusercontent.com).
public string ExpectedOidcIssuer { get; }
Property Value
Methods
ForExact(string, string)
Requires an exact match for both issuer and identity string.
public static VerificationPolicy ForExact(string issuer, string identity)
Parameters
Returns
- VerificationPolicy
Immutable policy instance.
ForGitHubActions(string, string, string?)
Builds a GitHub Actions-oriented policy for https://token.actions.githubusercontent.com.
public static VerificationPolicy ForGitHubActions(string repository, string gitRef, string? workflow = null)
Parameters
repositorystringRepository in
owner/nameform.gitRefstringGit ref (for example
refs/heads/main).workflowstringOptional workflow name; when empty, identity is matched only by repo and ref.
Returns
- VerificationPolicy
Immutable policy instance.
ForRegexSubject(string, string)
Requires an exact issuer and a subject that matches a regular expression.
public static VerificationPolicy ForRegexSubject(string issuer, string subjectPattern)
Parameters
Returns
- VerificationPolicy
Immutable policy instance.