Skip to content

keyid is not Optional in securesystemslib Signature #416

Open
@PradyumnaKrishna

Description

@PradyumnaKrishna

Description of issue or feature request:
As per DSSE signing-spec keyid field must be optional and treated the same as set-but-empty. Currently, securesystemslib Signature and Key Schema don't have keyid as optional. create_signature() and verify_signature() method in keys.py require them to create and verify signatures.

Current behavior:
There is no support for keyid as optional field in securesystemslib formats for SIGNATURE, or KEY_SCHEMA (e.g. ANYKEY_SCHEMA in formats.py).

ANYKEY_SCHEMA = SCHEMA.Object(
object_name = 'ANYKEY_SCHEMA',
keytype = KEYTYPE_SCHEMA,
scheme = SCHEME_SCHEMA,
keyid = KEYID_SCHEMA,
keyid_hash_algorithms = SCHEMA.Optional(HASHALGORITHMS_SCHEMA),
keyval = KEYVAL_SCHEMA,
expires = SCHEMA.Optional(ISO8601_DATETIME_SCHEMA))

Expected behavior:
securesystemslib should mark keyid field as optional, which can be any string not just hex? or provide good alternatives to current methods for creation or verification of signatures that doesn't requires keyid.

Linked Discussion: in-toto#2 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionIssues that require discussiondocs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions