Skip to content

Verify any of several identities via CLI #1904

Description

@hugovk

Description

Right now, an artifact that has been signed by one of several people can be verified via library use something like:

from sigstore.models import Bundle
from sigstore.verify import Verifier, policy

# Accept a signature from any one of several trusted identities.
# Each identity is pinned to the OIDC issuer it authenticates with.
TRUSTED_IDENTITIES = policy.AnyOf([
    policy.Identity(identity="alice@example.com", issuer="https://accounts.google.com"),
    policy.Identity(identity="bob@example.com", issuer="https://github.com/login/oauth"),
])

verifier = Verifier.production()
with open(filename, "rb") as f:
    verifier.verify_artifact(f.read(), Bundle.from_json(bundle_json),
TRUSTED_IDENTITIES)

But it's only possible to verify against a single identity via CLI:

sigstore verify identity \
    --cert-identity alice@example.com \
    --cert-oidc-issuer https://accounts.google.com \
    artifact.tgz

It would be useful to be able to verify against one of several via CLI as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions