Signer API

The signer module provides a simple and unified cryptographic signing and signature verification API designed to work consistently regardless of the underlying signing technology. This is achieved with abstract interfaces backed by multiple implementations:

  • Signer.sign

  • Key.verify_signature

The interfaces can be implemented using arbitrary asymmetric signing technology. The Key class is also a container class for public key data. The Signer class, on the other hand, treats the private key as implementation detail. This means that one specific signer may indeed contain the private key, but another calls a remote cloud KMS, or a local hardware token for signing.

In addition to sign and verify interface methods, the signer API provides generic load methods:

  • Signer.from_priv_key_uri - Loads any specific signer from a URI. The specific signer implementation itself is responsible for the URI format and resolution. To become discoverable, signers and their URI schemes are registered in the SIGNER_FOR_URI_SCHEME lookup table.

  • Key.from_dict - Loads any specific key from a serialized format. The specific key implementation is responsible for the public key format and deserialization. To become discoverable, key type and signing scheme – required fields in any public key – are registered in the KEY_FOR_TYPE_AND_SCHEME lookup table.

An application can use these same methods to uniformly load any signer or public key, regardless of the specific implementation. Many signers and keys are already included in the signer API. And an application can also create and register its own.

Usage

The signer API is designed around a 4-step lifecycle.

Crucially, steps 1 and 2 are one-time setup operations specific to the chosen signing technology (e.g. a hardware token or a Cloud KMS).

In contrast, steps 3 and 4 are completely technology-agnostic: the exact same signing and verification code works for all signers and public keys.

  1. Generate key pair (technology-specific, one-time)

    Typically done out-of-band using tooling specific to the signing technology (for example, generating a key on a Yubikey with Yubico Authenticator, or creating a signing key via a Cloud KMS console / CLI).

  2. Configure public key and signer details (signer-specific, one-time)

    Signer implementations provide an import_() class method to read the public key and construct the corresponding private key URI required to access the signer. Both the private key URI and the public key should be stored for later use.

  3. Sign (generic, repeatable)

    Load any signer uniformly using Signer.from_priv_key_uri() with the stored private key URI and the public key. Signers that require user secrets (such as an HSM PIN or passphrase) accept an optional SecretsHandler callback.

  4. Verify (generic, repeatable)

    Deserialize the public key with Key.from_dict() and call Key.verify_signature(). The verifying application does not need to know where or how the signature was created.

Example

The following example illustrates the full lifecycle using HSMSigner (a PKCS#11 hardware token such as a YubiKey):

# --- Steps 1 & 2: Technology-specific one-time setup ---

# Step 1 (out-of-band): Generate key pair on the hardware token (e.g.
# using Yubico Authenticator)

# Step 2: Import public key and private key URI from the hardware token
from securesystemslib.signer import HSMSigner

uri, public_key = HSMSigner.import_()
# Save the URI string and serialized public key for later use
# uri -> "hsm:2?label=YubiKey+PIV+%2315835999"
public_key_dict = public_key.to_dict()


# --- Steps 3 & 4: technology-agnostic signing and verification ---
# The code below works identically for ANY signer
from getpass import getpass
from securesystemslib.signer import Key, Signer

# Step 3: Sign using generic Signer interface
# In the Yubikey case, user may be asked for a PIN
def pin_handler(secret_name: str) -> str:
    return getpass(f"Enter {secret_name}: ")

# Load the stored public key and signer
signer = Signer.from_priv_key_uri(uri, public_key, secrets_handler=pin_handler)
signature = signer.sign(b"data to sign")

# Step 4: Verify using generic Key interface
public_key.verify_signature(signature, b"data to sign")

Note

See ‘New Signer API’ blog post for background information.

API documentation

SIGNER_FOR_URI_SCHEME: dict[str, type]

Signer dispatch table for Signer.from_priv_key()

See securesystemslib.signer.SIGNER_FOR_URI_SCHEME for default URI schemes, and how to register custom implementations.

KEY_FOR_TYPE_AND_SCHEME: dict[tuple[str, str], type]

Key dispatch table for Key.from_dict()

See securesystemslib.signer.KEY_FOR_TYPE_AND_SCHEME for default key types and schemes, and how to register custom implementations.

class Signer

Signer interface that supports multiple signing implementations.

Usage example:

signer = Signer.from_priv_key_uri(uri, pub_key)
sig = signer.sign(b"data")

Note that signer implementations may raise errors (during both Signer.from_priv_key_uri() and Signer.sign()) that are not documented here: examples could include network errors or file read errors. Applications should use generic try-except here if unexpected raises are not an option.

See SIGNER_FOR_URI_SCHEME for supported private key URI schemes.

Interactive applications may also define a secrets handler that allows asking for user secrets if they are needed:

from getpass import getpass

def sec_handler(secret_name:str) -> str:
    return getpass(f"Enter {secret_name}: ")

signer = Signer.from_priv_key_uri(uri, pub_key, sec_handler)

Applications can provide their own Signer and Key implementations:

from securesystemslib.signer import Signer, SIGNER_FOR_URI_SCHEME
from mylib import MySigner

SIGNER_FOR_URI_SCHEME[MySigner.MY_SCHEME] = MySigner

This way the application code using signer API continues to work with default signers but now also uses the custom signer when the proper URI is used.

abstractmethod classmethod from_priv_key_uri(priv_key_uri, public_key, secrets_handler=None)

Factory constructor for a given private key URI

Returns a specific Signer instance based on the private key URI and the supported uri schemes listed in SIGNER_FOR_URI_SCHEME.

Parameters:
  • priv_key_uri (str) – URI that identifies the private key

  • public_key (Key) – Key that is the public portion of this private key

  • secrets_handler (Callable[[str], str] | None) – Optional function that may be called if the signer needs additional secrets (like a PIN or passphrase). secrets_handler should return the requested secret string.

Raises:
  • ValueError – Incorrect arguments

  • Other Signer-specific errors – These could include OSErrors for reading files or network errors for connecting to a KMS.

Return type:

Signer

abstract property public_key: Key

Returns: Public key the signer is based off.

abstractmethod sign(payload)

Signs a given payload by the key assigned to the Signer instance.

Parameters:

payload (bytes) – The bytes to be signed.

Returns:

Returns a “Signature” class instance.

Return type:

Signature

class Key(keyid, keytype, scheme, keyval, unrecognized_fields=None)

Abstract class representing the public portion of a key.

All parameters named below are not just constructor arguments but also instance attributes.

Parameters:
  • keyid (str) – Key identifier that is unique within the metadata it is used in. Keyid is not verified to be the hash of a specific representation of the key.

  • keytype (str) – Key type, e.g. KEY_TYPE_RSA, KEY_TYPE_ED25519 or KEY_TYPE_ECDSA.

  • scheme (str) – Signature scheme. For example: RSASSA_PSS_SHA256, ED25519, and ECDSA_SHA2_NISTP256.

  • keyval (dict[str, Any]) – Opaque key content

  • unrecognized_fields (dict[str, Any] | None) – Dictionary of all attributes that are not managed by Securesystemslib

Raises:

TypeError – Invalid type for an argument.

abstractmethod classmethod from_dict(keyid, key_dict)

Creates Key object from a serialization dict

Key implementations must override this factory constructor that is used as a deserialization helper.

Users should call Key.from_dict(): it dispatches to the actual subclass implementation based on supported keys in KEY_FOR_TYPE_AND_SCHEME.

Raises:

KeyError, TypeError – Invalid arguments.

Parameters:
  • keyid (str)

  • key_dict (dict[str, Any])

Return type:

Key

abstractmethod to_dict()

Returns a serialization dict.

Key implementations must override this serialization helper.

Return type:

dict[str, Any]

abstractmethod verify_signature(signature, data)

Raises if verification of signature over data fails.

Parameters:
  • signature (Signature) – Signature object.

  • data (bytes) – Payload bytes.

Raises:
  • UnverifiedSignatureError – Failed to verify signature.

  • VerificationError – Signature verification process error. If you are only interested in the verify result, just handle UnverifiedSignatureError: it contains VerificationError as well

Return type:

None

class Signature(keyid, sig, unrecognized_fields=None)

A container class containing information about a signature.

Contains a signature and the keyid uniquely identifying the key used to generate the signature.

Provides utility methods to easily create an object from a dictionary and return the dictionary representation of the object.

Parameters:
  • keyid (str) – HEX string used as a unique identifier of the key.

  • sig (str) – HEX string representing the signature.

  • unrecognized_fields (dict[str, Any] | None) – Dictionary of all attributes that are not managed by securesystemslib.

keyid

HEX string used as a unique identifier of the key.

signature

HEX string representing the signature.

unrecognized_fields

Dictionary of all attributes that are not managed by securesystemslib.

classmethod from_dict(signature_dict)

Creates a Signature object from its JSON/dict representation.

Parameters:

signature_dict (dict) – A dict containing a valid keyid and a signature. Note that the fields in it should be named “keyid” and “sig” respectively.

Raises:

KeyError – If any of the “keyid” and “sig” fields are missing from the signature_dict.

Return type:

Signature

Side Effect:

Destroys the metadata dict passed by reference.

Returns:

A “Signature” instance.

Parameters:

signature_dict (dict)

Return type:

Signature

to_dict()

Returns the JSON-serializable dictionary representation of self.

Return type:

dict

Key type constants

KEY_TYPE_RSA = 'rsa'

RSA key type.

KEY_TYPE_ECDSA = 'ecdsa'

ECDSA key type.

KEY_TYPE_ED25519 = 'ed25519'

Ed25519 key type. Note that Ed25519 is unsupported on many signer backends: The payload cannot be hashed before signing so hardware tokens and cloud KMSs generally do not support it because of payload size limitations.

KEY_TYPE_MLDSA = 'ml-dsa'

ML-DSA key type. Keytype defines pre-signing hashing with SHA-512. See https://github.com/theupdateframework/taps/blob/master/tap21.md

Signing scheme constants

ECDSA_SHA2_NISTP256 = 'ecdsa-sha2-nistp256'

ECDSA signature scheme over NIST P-256 with SHA-256. Supported with key type KEY_TYPE_ECDSA.

ECDSA_SHA2_NISTP384 = 'ecdsa-sha2-nistp384'

ECDSA signature scheme over NIST P-384 with SHA-384. Supported with key type KEY_TYPE_ECDSA.

ECDSA_SHA2_NISTP521 = 'ecdsa-sha2-nistp521'

ECDSA signature scheme over NIST P-521 with SHA-512. Supported with key type KEY_TYPE_ECDSA.

RSASSA_PSS_SHA224 = 'rsassa-pss-sha224'

RSASSA-PSS signature scheme with SHA-224. Supported with key type KEY_TYPE_RSA.

RSASSA_PSS_SHA256 = 'rsassa-pss-sha256'

RSASSA-PSS signature scheme with SHA-256. Supported with key type KEY_TYPE_RSA.

RSASSA_PSS_SHA384 = 'rsassa-pss-sha384'

RSASSA-PSS signature scheme with SHA-384. Supported with key type KEY_TYPE_RSA.

RSASSA_PSS_SHA512 = 'rsassa-pss-sha512'

RSASSA-PSS signature scheme with SHA-512. Supported with key type KEY_TYPE_RSA.

RSA_PKCS1V15_SHA224 = 'rsa-pkcs1v15-sha224'

RSA-PKCS#1 v1.5 signature scheme with SHA-224. Supported with key type KEY_TYPE_RSA.

RSA_PKCS1V15_SHA256 = 'rsa-pkcs1v15-sha256'

RSA-PKCS#1 v1.5 signature scheme with SHA-256. Supported with key type KEY_TYPE_RSA.

RSA_PKCS1V15_SHA384 = 'rsa-pkcs1v15-sha384'

RSA-PKCS#1 v1.5 signature scheme with SHA-384. Supported with key type KEY_TYPE_RSA.

RSA_PKCS1V15_SHA512 = 'rsa-pkcs1v15-sha512'

RSA-PKCS#1 v1.5 signature scheme with SHA-512. Supported with key type KEY_TYPE_RSA.

ED25519 = 'ed25519'

Ed25519 pure signature scheme . Supported with key type KEY_TYPE_ED25519.

MLDSA_44_1 = 'ml-dsa-44/1'

ML-DSA-44 signature scheme. Supported with key type KEY_TYPE_MLDSA.

MLDSA_65_1 = 'ml-dsa-65/1'

ML-DSA-65 signature scheme. Supported with key type KEY_TYPE_MLDSA.

MLDSA_87_1 = 'ml-dsa-87/1'

ML-DSA-87 signature scheme. Supported with key type KEY_TYPE_MLDSA.

Signer implementations

All signers implement the Signer interface: only the unique API specific to each signer is documented below.

class CryptoSigner

File-based signer using the cryptography (pyca/cryptography) library.

Supports signing with RSA, ECDSA, Ed25519, and ML-DSA keys.

The private key URI scheme is: file2:<PATH>, where <PATH> is the filesystem path to a PEM-encoded PKCS#8 private key file. If the CRYPTO_SIGNER_PATH_PREFIX environment variable is set, the path will be resolved relative to that prefix.

A CryptoSigner can be instantiated with:

  • Signer.from_priv_key_uri("file2:<PATH>", public_key): Generic way to load from an existing private key file.

  • CryptoSigner.generate_*() factory methods generate new key pairs

  • CryptoSigner(privkey, pubkey): Direct instantiation using existing pyca/cryptography private key objects.

static generate_ecdsa(keyid=None, scheme=None)

Generate new key pair for an ecdsa signer.

Parameters:
  • keyid (str | None) – Key identifier. If not passed, a default keyid is computed.

  • scheme (str | None) – A valid ecdsa scheme, which also selects the curve. If not passed, “ecdsa-sha2-nistp256” is used.

Raises:
  • UnsupportedLibraryError – pyca/cryptography not installed

  • ValueError – Invalid scheme

Return type:

CryptoSigner

static generate_ed25519(keyid=None)

Generate new key pair as “ed25519” signer.

Parameters:

keyid (str | None) – Key identifier. If not passed, a default keyid is computed.

Raises:

UnsupportedLibraryError – pyca/cryptography not installed

Return type:

CryptoSigner

static generate_mldsa(keyid=None, scheme=None)

Generate new key pair for a ML-DSA signer.

Parameters:
  • keyid (str | None) – Key identifier. If not passed, a default keyid is computed.

  • scheme (str | None) – A valid key scheme for ml-dsa. If not passed, “ml-dsa-65/1” is used

Raises:

UnsupportedLibraryError – pyca/cryptography not installed

Return type:

CryptoSigner

static generate_rsa(keyid=None, scheme='rsassa-pss-sha256', size=3072)

Generate new key pair as rsa signer.

Parameters:
  • keyid (str | None) – Key identifier. If not passed, a default keyid is computed.

  • scheme (str | None) – RSA signing scheme. Default is “rsassa-pss-sha256”.

  • size (int) – RSA key size in bits. Default is 3072.

Raises:

UnsupportedLibraryError – pyca/cryptography not installed

Return type:

CryptoSigner

property private_bytes: bytes

Return the PEM encoded PKCS8 format private key as bytes

The return value can be used as file content when a Signer is loaded with Signer.from_priv_key_uri(‘file2:<FILEPATH>’).

class AWSSigner

AWS Key Management Service Signer.

This Signer uses AWS KMS to sign, supporting RSA and EC keys. The signer computes hash digests locally and sends only the digest to AWS KMS.

The private key URI scheme is: awskms:<AWS_KEY_ID>, where <AWS_KEY_ID> can be a key ID, key ARN, alias name, or alias ARN.

Authentication uses ambient credentials (typically environment variables such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN) recognized by the boto3 SDK.

For more details on AWS authentication, refer to the AWS Command Line Interface User Guide.

The specific IAM permissions that AWSSigner needs are:

  • kms:GetPublicKey for AWSSigner.import_()

  • kms:Sign for Signer.sign()

classmethod import_(aws_key_id, local_scheme=None)

Loads a key and signer details from AWS KMS.

Returns the private key uri and the public key. This method should only be called once per key: the uri and Key should be stored for later use.

Parameters:
  • aws_key_id (str) – AWS KMS key ID.

  • local_scheme (str | None) – securesystemslib key scheme. Defaults to ‘rsassa-pss-sha256’ if not provided.

Raises:
  • UnsupportedAlgorithmError – If the AWS KMS signing algorithm is unsupported.

  • BotoCoreError – Errors from the botocore library.

  • ClientError – Errors related to AWS KMS client.

Returns:

A tuple of private key URI string and public key.

Return type:

tuple[str, SSlibKey]

class AzureSigner

Azure Key Vault Signer.

This Signer uses Azure Key Vault to sign. Currently this signer supports signing with EC keys (NIST curves P-256, P-384, and P-521).

The private key URI scheme is: azurekms://<vault-name>.vault.azure.net/keys/<key-name>/<version>

Authentication uses ambient credentials via azure.identity.DefaultAzureCredential (such as environment variables AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_TENANT_ID, managed identities, or Azure CLI login).

The specific permissions that AzureSigner needs are:

  • “Key Vault Crypto User” (or equivalent custom RBAC role) for AzureSigner.import_() and Signer.sign()

See Azure Key Vault RBAC guide for a list of all built-in Azure Key Vault roles.

classmethod import_(az_vault_name, az_key_name)

Load key and signer details from KMS

Returns the private key uri and the public key. This method should only be called once per key: the uri and Key should be stored for later use.

Parameters:
  • az_vault_name (str)

  • az_key_name (str)

Return type:

tuple[str, SSlibKey]

class GCPSigner

Google Cloud KMS Signer.

This Signer uses Google Cloud KMS to sign. The payload is hashed locally, but the signature is created on the KMS.

The private key URI scheme is: gcpkms:<gcp_keyid>, where <gcp_keyid> is the fully qualified GCP KMS key name: projects/<project>/locations/<location>/keyRings/<keyRing>/cryptoKeys/<key>/cryptoKeyVersions/<version>.

Authentication uses ambient credentials (typically the environment variable GOOGLE_APPLICATION_CREDENTIALS pointing to a service account key file, or Google Application Default Credentials): https://cloud.google.com/docs/authentication/getting-started.

The specific Google Cloud IAM roles that GCPSigner needs are:

  • roles/cloudkms.publicKeyViewer for GCPSigner.import_()

  • roles/cloudkms.signer for Signer.sign()

classmethod import_(gcp_keyid)

Load key and signer details from KMS

This method should only be called once per key: the uri and Key should be stored for later use.

Requires roles/cloudkms.publicKeyViewer role on Google Cloud.

Parameters:
  • gcp_id – Fully qualified GCP KMS key name (projects/<P>/locations/<L>/keyRings/<R>/cryptoKeys/<K>/cryptoKeyVersions/<V>).

  • gcp_keyid (str)

Returns:

Tuple with private key URI and the public key

Return type:

tuple[str, SSlibKey]

class HSMSigner

Hardware Security Key Signer.

HSMSigner uses PKCS#11 API to sign with hardware security keys like YubiKeys. It Supports signing schemes ECDSA_SHA2_NISTP256 and ECDSA_SHA2_NISTP384.

The environment variable PYKCS11LIB must be set to the path of the PKCS#11 shared library module for the hardware token (for example, /usr/lib/x86_64-linux-gnu/libykcs11.so or /usr/local/lib/libykcs11.dylib).

The private key URI scheme is: hsm:[<KEYID>][?label=<LABEL>] where both KEYID and LABEL are optional. Example URIs:

  • hsm:: Sign with a key with default keyid 2 (PIV digital signature slot 9c) on the only token/smartcard available.

  • hsm:2?label=YubiKey+PIV+%2315835999: Sign with key with keyid 2 (PIV slot 9c) on a token with label “YubiKey+PIV+%2315835999”.

Requires environment variable PYKCS11LIB to contain path to PKCS#11 module.

Usage:

# Store public key and URI for your HSM device for later use. By default
# slot 9c is selected.
uri, pubkey = HSMSigner.import_()

# Later, use the uri and pubkey to sign (providing PIN via SecretsHandler)
def pin_handler(secret: str) -> str:
    return getpass(f"Enter {secret}: ")

signer = Signer.from_priv_key_uri(uri, pubkey, pin_handler)
sig = signer.sign(b"DATA")
pubkey.verify_signature(sig, b"DATA")
classmethod import_(hsm_keyid=None, token_label=None, secrets_handler=None)

Import public key and signer details from HSM.

Either only one cryptographic token must be present when importing or a token_label that matches a single token must be provided.

import_() should be called once and the returned URI and public key should be stored for later use.

Parameters:
  • hsm_keyid (int | None) – Key identifier on the token. Default is 2 (meaning PIV key slot 9c).

  • token_label (str | None) – Token label to filter the correct cryptographic token. If no label is provided one is built from the token found.

  • secrets_handler (Callable[[str], str] | None) – Will be called if reading the public key requires PIN.

Raises:
  • UnsupportedLibraryError – python-pkcs11 and cryptography libraries not found.

  • ValueError – A matching HSM device or key could not be found.

Return type:

tuple[str, SSlibKey]

class TKeySigner

Post-Quantum signer for the Tillitis TKey security token.

Supports signing scheme MLDSA_44_1.

The private key URI is: tkey:[device_path]?digest=<hex_prefix>&[passphrase=true]

  • digest is required in the URI: The device binary (identified by its digest hash prefix) is part of the private key seed. A key can only be used with the same exact binary.

  • device_path is optional and not typically needed as device detection is automatic.

  • If passphrase=true is present in the URI, a secrets_handler must be provided to Signer.from_priv_key_uri() to supply the passphrase secret.

Examples

  • tkey:?digest=7c75714

  • tkey:?digest=7c75714&passphrase=true

  • tkey:/dev/ttyACM0?digest=7c75714&passphrase=true

classmethod import_(digest=None, device_path=None, passphrase=None)

Import public key and signer details from a TKey device.

Parameters:
  • digest (str | None) – Optional digest or digest prefix of device binary. If not given, the current default device binary is used.

  • device_path (str | None) – Optional COM port path. Typically not useful as the port may be dynamic

  • passphrase (str | None) – Optional “User Supplied Secret”. Will be used as part of the seed for the private key

Returns:

Tuple of private key URI string and public key

Return type:

tuple[str, SSlibKey]

class VaultSigner

Signer for HashiCorp Vault Transit secrets engine.

The signer uses ambient credentials to connect to Vault, most notably the environment variables VAULT_ADDR and VAULT_TOKEN must be set: https://developer.hashicorp.com/vault/docs/commands#environment-variables

The private key URI scheme is: hv:<KEY NAME>/<KEY VERSION>.

classmethod import_(hv_key_name)

Load key and signer details from HashiCorp Vault.

If multiple keys exist in the vault under the passed name, only the newest key is returned. Supported key type is: ed25519

See class documentation for details about settings and uri format.

Parameters:

hv_key_name (str) – Name of vault key to import.

Raises:
  • UnsupportedLibraryError – hvac or cryptography are not installed.

  • Various errors from hvac. –

Returns:

Private key uri and public key.

Return type:

tuple[str, SSlibKey]

class SigstoreSigner

Sigstore signer.

NOTE: The Sigstore key and signature serialization formats are not yet considered stable in securesystemslib. They may change in future releases and may not be supported by other implementations.

All signers should be instantiated with Signer.from_priv_key_uri(). Unstable SigstoreSigner currently requires opt-in via securesystemslib.signer.SIGNER_FOR_URI_SCHEME.

Usage:

identity = "luk.puehringer@gmail.com"  # change, unless you know pw
issuer = "https://github.com/login/oauth"

# Create signer URI and public key for identity and issuer
uri, public_key = SigstoreSigner.import_(identity, issuer, ambient=False)

# Load signer from URI -- requires browser login with GitHub
signer = SigstoreSigner.from_priv_key_uri(uri, public_key)

# Sign with signer and verify public key
signature = signer.sign(b"data")
public_key.verify_signature(signature, b"data")

The private key URI scheme is sigstore:?<PARAMS>, where PARAMS is optional and toggles ambient credential usage. Example URIs:

  • sigstore::

    Sign with ambient credentials.

  • sigstore:?ambient=false:

    Sign with OAuth2 + OpenID via browser login.

classmethod import_(identity, issuer, ambient=True)

Create public key and signer URI.

Returns a private key URI (for Signer.from_priv_key_uri()) and a public key. import_() should be called once and the returned URI and public key should be stored for later use.

Parameters:
  • identity (str) – The OIDC identity to use when verifying a signature.

  • issuer (str) – The OIDC issuer to use when verifying a signature.

  • ambient (bool) – Toggle usage of ambient credentials in returned URI.

Return type:

tuple[str, SigstoreKey]

classmethod import_github_actions(project, workflow_path, ref='refs/heads/main')

Convenience method to build identity and issuer string for import_() from GitHub project and workflow path.

Parameters:
  • project (str) – GitHub project name (example: “secure-systems-lab/securesystemslib”)

  • workflow_path (str) – GitHub workflow path (example: “.github/workflows/online-sign.yml”)

  • ref (str | None) – optional GitHub ref, defaults to refs/heads/main

Returns:

string key: SigstoreKey

Return type:

uri

classmethod import_via_auth()

Create public key and signer URI by interactive authentication

Returns a private key URI (for Signer.from_priv_key_uri()) and a public key. This method always uses the interactive authentication.

Return type:

tuple[str, SigstoreKey]