Signer Wrapper

Set of signing wrappers which wraps functionality of pubtools-sign projects and provides extra methods needed for the signign process.

class pubtools._quay.signer_wrapper.MsgSignerSettingsSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)[source]

Validation schema for messaging signer settings.

class pubtools._quay.signer_wrapper.SignerWrapper(config_file: Optional[str] = None, settings: Optional[Dict[str, Any]] = None)[source]

Wrapper providing functionality to sign containers with a generic signer.

SCHEMA

alias of NoSchema

property entry_point: Any

Load and return entry point for pubtools-sign project.

remove_signatures(signatures: List[Tuple[str, str, str]], _exclude: Optional[List[Tuple[str, str, str]]] = None) None[source]

Remove signatures from a sigstore.

sign_container_opt_args(sign_entry: List[SignEntry], task_id: Optional[str] = None) Dict[str, Any][source]

Return optional arguments for signing a container.

Args:

sign_entries (List[SignEntry]): List of SignEntry. task_id (str): Task ID to identify the signing task if needed.

Returns:

dict: Optional arguments for signing a container.

sign_containers(to_sign_entries: List[SignEntry], task_id: Optional[str] = None) None[source]

Sign signing entries.

Entries are sent to signer in chunks of chunk_size size.

Args:

to_sign_entries (List[SignEntry]): list of entries to sign. task_id (str): optional identifier used in signing process. parallelism (int): determines how many entries should be signed in parallel.

validate_settings(settings: Optional[Dict[str, Any]] = None) None[source]

Validate provided settings for the SignerWrapper.

class pubtools._quay.signer_wrapper.MsgSignerWrapper(config_file: Optional[str] = None, settings: Optional[Dict[str, Any]] = None)[source]

Wrapper for messaging signer functionality.

SCHEMA

alias of MsgSignerSettingsSchema

remove_signatures(signatures: List[Tuple[str, str, str]], _exclude: Optional[List[Tuple[str, str, str]]] = None) None[source]

Remove signatures from sigstore.

Args:

signatures (list): List of tuples containing (digest, reference, repository) of signatures to remove. exclude (Optional[List[Tuple[str, str, str]]]): List of (digest, tag, repository) tuples of signautres to keep.

sign_container_opt_args(sign_entries: List[SignEntry], task_id: Optional[str] = None) Dict[str, Any][source]

Return optional arguments for signing a container.

Args:

sign_entries (List[SignEntry]): List of SignEntry. task_id (str): Task ID to identify the signing task if needed.

Returns:

dict: Optional arguments for signing a container.

class pubtools._quay.signer_wrapper.CosignSignerSettingsSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool = False, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet = False, unknown: str | None = None)[source]

Validation schema for cosign signer settings.

class pubtools._quay.signer_wrapper.CosignSignerWrapper(config_file: Optional[str] = None, settings: Optional[Dict[str, Any]] = None)[source]

Wrapper for cosign signer functionality.