Skip to content

Commit

Permalink
fix: keyid is allowed to be empty
Browse files Browse the repository at this point in the history
Using sigstore to sign some metadata, a key ID isn't part of the
resulting date.

Archivista cannot handle it on upload, getting a key id length
error when it's blank.

The DSSE specification allows key id to be blank.

closes in-toto#321

Signed-off-by: Kairo Araujo <kairo.araujo@testifysec.com>
  • Loading branch information
kairoaraujo committed Aug 20, 2024
1 parent d8c9aff commit fc72540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ent/schema/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type Signature struct {
func (Signature) Fields() []ent.Field {
return []ent.Field{
field.UUID("id", uuid.UUID{}).Default(uuid.New).Immutable().Unique(),
field.String("key_id").NotEmpty(),
field.String("key_id"),
field.String("signature").NotEmpty().SchemaType(map[string]string{dialect.MySQL: "text"}),
}
}
Expand Down

0 comments on commit fc72540

Please sign in to comment.