From 775f38b42cc2fe0abb70f74fb302f75802ad9496 Mon Sep 17 00:00:00 2001 From: Bob Callaway Date: Fri, 20 Aug 2021 07:34:32 -0400 Subject: [PATCH] remove extradata field from types (#418) Signed-off-by: Bob Callaway --- pkg/generated/models/alpine_v001_schema.go | 3 -- pkg/generated/models/helm_v001_schema.go | 3 -- pkg/generated/models/intoto_v001_schema.go | 3 -- pkg/generated/models/jar_v001_schema.go | 3 -- pkg/generated/models/rekord_v001_schema.go | 3 -- pkg/generated/models/rfc3161_v001_schema.go | 3 -- pkg/generated/models/rpm_v001_schema.go | 3 -- pkg/generated/models/tuf_v001_schema.go | 3 -- pkg/generated/restapi/embedded_spec.go | 40 ------------------- .../alpine/v0.0.1/alpine_v0_0_1_schema.json | 5 --- pkg/types/alpine/v0.0.1/entry.go | 4 -- pkg/types/alpine/v0.0.1/entry_test.go | 17 -------- pkg/types/helm/v0.0.1/entry.go | 1 - pkg/types/helm/v0.0.1/helm_v0_0_1_schema.json | 5 --- .../intoto/v0.0.1/intoto_v0_0_1_schema.json | 5 --- pkg/types/jar/v0.0.1/entry.go | 4 -- pkg/types/jar/v0.0.1/entry_test.go | 14 ------- pkg/types/jar/v0.0.1/jar_v0_0_1_schema.json | 5 --- pkg/types/rekord/v0.0.1/entry.go | 4 -- pkg/types/rekord/v0.0.1/entry_test.go | 21 ---------- .../rekord/v0.0.1/rekord_v0_0_1_schema.json | 5 --- pkg/types/rfc3161/v0.0.1/entry.go | 3 -- pkg/types/rfc3161/v0.0.1/entry_test.go | 13 ------ .../rfc3161/v0.0.1/rfc3161_v0_0_1_schema.json | 5 --- pkg/types/rpm/v0.0.1/entry.go | 4 -- pkg/types/rpm/v0.0.1/entry_test.go | 17 -------- pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json | 5 --- pkg/types/tuf/v0.0.1/entry.go | 1 - pkg/types/tuf/v0.0.1/entry_test.go | 17 -------- pkg/types/tuf/v0.0.1/tuf_v0_0_1_schema.json | 5 --- 30 files changed, 224 deletions(-) diff --git a/pkg/generated/models/alpine_v001_schema.go b/pkg/generated/models/alpine_v001_schema.go index ad8786268..82ba141c5 100644 --- a/pkg/generated/models/alpine_v001_schema.go +++ b/pkg/generated/models/alpine_v001_schema.go @@ -38,9 +38,6 @@ import ( // swagger:model alpineV001Schema type AlpineV001Schema struct { - // Arbitrary content to be included in the verifiable entry in the transparency log - ExtraData interface{} `json:"extraData,omitempty"` - // package // Required: true Package *AlpineV001SchemaPackage `json:"package"` diff --git a/pkg/generated/models/helm_v001_schema.go b/pkg/generated/models/helm_v001_schema.go index 159500459..5770f8cfc 100644 --- a/pkg/generated/models/helm_v001_schema.go +++ b/pkg/generated/models/helm_v001_schema.go @@ -42,9 +42,6 @@ type HelmV001Schema struct { // Required: true Chart *HelmV001SchemaChart `json:"chart"` - // Arbitrary content to be included in the verifiable entry in the transparency log - ExtraData interface{} `json:"extraData,omitempty"` - // public key // Required: true PublicKey *HelmV001SchemaPublicKey `json:"publicKey"` diff --git a/pkg/generated/models/intoto_v001_schema.go b/pkg/generated/models/intoto_v001_schema.go index 1f3741569..e310c9f6d 100644 --- a/pkg/generated/models/intoto_v001_schema.go +++ b/pkg/generated/models/intoto_v001_schema.go @@ -42,9 +42,6 @@ type IntotoV001Schema struct { // Required: true Content *IntotoV001SchemaContent `json:"content"` - // Arbitrary content to be included in the verifiable entry in the transparency log - ExtraData interface{} `json:"extraData,omitempty"` - // The public key that can verify the signature // Required: true // Format: byte diff --git a/pkg/generated/models/jar_v001_schema.go b/pkg/generated/models/jar_v001_schema.go index 1459afbd7..05415ee36 100644 --- a/pkg/generated/models/jar_v001_schema.go +++ b/pkg/generated/models/jar_v001_schema.go @@ -42,9 +42,6 @@ type JarV001Schema struct { // Required: true Archive *JarV001SchemaArchive `json:"archive"` - // Arbitrary content to be included in the verifiable entry in the transparency log - ExtraData interface{} `json:"extraData,omitempty"` - // signature Signature *JarV001SchemaSignature `json:"signature,omitempty"` } diff --git a/pkg/generated/models/rekord_v001_schema.go b/pkg/generated/models/rekord_v001_schema.go index d753597c9..944781f8a 100644 --- a/pkg/generated/models/rekord_v001_schema.go +++ b/pkg/generated/models/rekord_v001_schema.go @@ -42,9 +42,6 @@ type RekordV001Schema struct { // Required: true Data *RekordV001SchemaData `json:"data"` - // Arbitrary content to be included in the verifiable entry in the transparency log - ExtraData interface{} `json:"extraData,omitempty"` - // signature // Required: true Signature *RekordV001SchemaSignature `json:"signature"` diff --git a/pkg/generated/models/rfc3161_v001_schema.go b/pkg/generated/models/rfc3161_v001_schema.go index ab318315d..26afc6e58 100644 --- a/pkg/generated/models/rfc3161_v001_schema.go +++ b/pkg/generated/models/rfc3161_v001_schema.go @@ -37,9 +37,6 @@ import ( // swagger:model rfc3161V001Schema type Rfc3161V001Schema struct { - // Arbitrary content to be included in the verifiable entry in the transparency log - ExtraData interface{} `json:"extraData,omitempty"` - // tsr // Required: true Tsr *Rfc3161V001SchemaTsr `json:"tsr"` diff --git a/pkg/generated/models/rpm_v001_schema.go b/pkg/generated/models/rpm_v001_schema.go index 42d4701b2..63b0b14ba 100644 --- a/pkg/generated/models/rpm_v001_schema.go +++ b/pkg/generated/models/rpm_v001_schema.go @@ -38,9 +38,6 @@ import ( // swagger:model rpmV001Schema type RpmV001Schema struct { - // Arbitrary content to be included in the verifiable entry in the transparency log - ExtraData interface{} `json:"extraData,omitempty"` - // package // Required: true Package *RpmV001SchemaPackage `json:"package"` diff --git a/pkg/generated/models/tuf_v001_schema.go b/pkg/generated/models/tuf_v001_schema.go index b9bc5a670..6a74cfa63 100644 --- a/pkg/generated/models/tuf_v001_schema.go +++ b/pkg/generated/models/tuf_v001_schema.go @@ -37,9 +37,6 @@ import ( // swagger:model tufV001Schema type TUFV001Schema struct { - // Arbitrary content to be included in the verifiable entry in the transparency log - ExtraData interface{} `json:"extraData,omitempty"` - // metadata // Required: true Metadata *TUFV001SchemaMetadata `json:"metadata"` diff --git a/pkg/generated/restapi/embedded_spec.go b/pkg/generated/restapi/embedded_spec.go index e8570e1d7..8008877a3 100644 --- a/pkg/generated/restapi/embedded_spec.go +++ b/pkg/generated/restapi/embedded_spec.go @@ -2443,11 +2443,6 @@ func init() { "package" ], "properties": { - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true - }, "package": { "description": "Information about the package associated with the entry", "type": "object", @@ -2662,11 +2657,6 @@ func init() { } } }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true - }, "publicKey": { "description": "The public key that can verify the package signature", "type": "object", @@ -2778,11 +2768,6 @@ func init() { } } }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true - }, "publicKey": { "description": "The public key that can verify the signature", "type": "string", @@ -2888,11 +2873,6 @@ func init() { } } }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true - }, "signature": { "description": "Information about the included signature in the JAR file", "type": "object", @@ -3025,11 +3005,6 @@ func init() { } } }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true - }, "signature": { "description": "Information about the detached signature associated with the entry", "type": "object", @@ -3151,11 +3126,6 @@ func init() { "tsr" ], "properties": { - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true - }, "tsr": { "description": "Information about the tsr file associated with the entry", "type": "object", @@ -3220,11 +3190,6 @@ func init() { "package" ], "properties": { - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true - }, "package": { "description": "Information about the package associated with the entry", "type": "object", @@ -3363,11 +3328,6 @@ func init() { "root" ], "properties": { - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true - }, "metadata": { "description": "TUF metadata", "type": "object", diff --git a/pkg/types/alpine/v0.0.1/alpine_v0_0_1_schema.json b/pkg/types/alpine/v0.0.1/alpine_v0_0_1_schema.json index 49c5eb582..2421b08db 100644 --- a/pkg/types/alpine/v0.0.1/alpine_v0_0_1_schema.json +++ b/pkg/types/alpine/v0.0.1/alpine_v0_0_1_schema.json @@ -79,11 +79,6 @@ "required": [ "content" ] } ] - }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true } }, "required": [ "publicKey", "package" ] diff --git a/pkg/types/alpine/v0.0.1/entry.go b/pkg/types/alpine/v0.0.1/entry.go index a674416f1..43ec183f0 100644 --- a/pkg/types/alpine/v0.0.1/entry.go +++ b/pkg/types/alpine/v0.0.1/entry.go @@ -281,7 +281,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { } canonicalEntry := models.AlpineV001Schema{} - canonicalEntry.ExtraData = v.AlpineModel.ExtraData var err error @@ -301,9 +300,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { // set .PKGINFO headers canonicalEntry.Package.Pkginfo = v.apkObj.Pkginfo - // ExtraData is copied through unfiltered - canonicalEntry.ExtraData = v.AlpineModel.ExtraData - // wrap in valid object with kind and apiVersion set apk := models.Alpine{} apk.APIVersion = swag.String(APIVERSION) diff --git a/pkg/types/alpine/v0.0.1/entry_test.go b/pkg/types/alpine/v0.0.1/entry_test.go index 2bbbfb5d1..9300dbc5e 100644 --- a/pkg/types/alpine/v0.0.1/entry_test.go +++ b/pkg/types/alpine/v0.0.1/entry_test.go @@ -346,23 +346,6 @@ func TestCrossFieldValidation(t *testing.T) { expectUnmarshalSuccess: true, expectCanonicalizeSuccess: true, }, - { - caseDesc: "valid obj with extradata", - entry: V001Entry{ - AlpineModel: models.AlpineV001Schema{ - PublicKey: &models.AlpineV001SchemaPublicKey{ - Content: strfmt.Base64(keyBytes), - }, - Package: &models.AlpineV001SchemaPackage{ - Content: strfmt.Base64(dataBytes), - }, - ExtraData: []byte("{\"something\": \"here\""), - }, - }, - hasExtEntities: false, - expectUnmarshalSuccess: true, - expectCanonicalizeSuccess: true, - }, } for _, tc := range testCases { diff --git a/pkg/types/helm/v0.0.1/entry.go b/pkg/types/helm/v0.0.1/entry.go index 78066c497..bba3b06fc 100644 --- a/pkg/types/helm/v0.0.1/entry.go +++ b/pkg/types/helm/v0.0.1/entry.go @@ -261,7 +261,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { } canonicalEntry := models.HelmV001Schema{} - canonicalEntry.ExtraData = v.HelmObj.ExtraData var err error diff --git a/pkg/types/helm/v0.0.1/helm_v0_0_1_schema.json b/pkg/types/helm/v0.0.1/helm_v0_0_1_schema.json index 07eda6aa6..1d99ab32f 100644 --- a/pkg/types/helm/v0.0.1/helm_v0_0_1_schema.json +++ b/pkg/types/helm/v0.0.1/helm_v0_0_1_schema.json @@ -99,11 +99,6 @@ } }, "required": [ "provenance" ] - }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true } }, "required": [ diff --git a/pkg/types/intoto/v0.0.1/intoto_v0_0_1_schema.json b/pkg/types/intoto/v0.0.1/intoto_v0_0_1_schema.json index 3ee865ecc..a8e8c054a 100644 --- a/pkg/types/intoto/v0.0.1/intoto_v0_0_1_schema.json +++ b/pkg/types/intoto/v0.0.1/intoto_v0_0_1_schema.json @@ -41,11 +41,6 @@ "description": "The public key that can verify the signature", "type": "string", "format": "byte" - }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true } }, "required": [ diff --git a/pkg/types/jar/v0.0.1/entry.go b/pkg/types/jar/v0.0.1/entry.go index 9c3c0c190..c7932f121 100644 --- a/pkg/types/jar/v0.0.1/entry.go +++ b/pkg/types/jar/v0.0.1/entry.go @@ -225,7 +225,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { } canonicalEntry := models.JarV001Schema{} - canonicalEntry.ExtraData = v.JARModel.ExtraData var err error // need to canonicalize key content @@ -248,9 +247,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { canonicalEntry.Archive.Hash.Value = v.JARModel.Archive.Hash.Value // archive content is not set deliberately - // ExtraData is copied through unfiltered - canonicalEntry.ExtraData = v.JARModel.ExtraData - // wrap in valid object with kind and apiVersion set jar := models.Jar{} jar.APIVersion = swag.String(APIVERSION) diff --git a/pkg/types/jar/v0.0.1/entry_test.go b/pkg/types/jar/v0.0.1/entry_test.go index 5eb924b30..004d5447a 100644 --- a/pkg/types/jar/v0.0.1/entry_test.go +++ b/pkg/types/jar/v0.0.1/entry_test.go @@ -182,20 +182,6 @@ func TestCrossFieldValidation(t *testing.T) { expectUnmarshalSuccess: true, expectCanonicalizeSuccess: false, }, - { - caseDesc: "valid obj with extradata", - entry: V001Entry{ - JARModel: models.JarV001Schema{ - Archive: &models.JarV001SchemaArchive{ - Content: strfmt.Base64(jarBytes), - }, - ExtraData: []byte("{\"something\": \"here\""), - }, - }, - hasExtEntities: false, - expectUnmarshalSuccess: true, - expectCanonicalizeSuccess: true, - }, } for _, tc := range testCases { diff --git a/pkg/types/jar/v0.0.1/jar_v0_0_1_schema.json b/pkg/types/jar/v0.0.1/jar_v0_0_1_schema.json index c344d37b7..f639a0feb 100644 --- a/pkg/types/jar/v0.0.1/jar_v0_0_1_schema.json +++ b/pkg/types/jar/v0.0.1/jar_v0_0_1_schema.json @@ -72,11 +72,6 @@ "required": [ "content" ] } ] - }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true } }, "required": [ "archive" ] diff --git a/pkg/types/rekord/v0.0.1/entry.go b/pkg/types/rekord/v0.0.1/entry.go index 99c77346d..5377987b4 100644 --- a/pkg/types/rekord/v0.0.1/entry.go +++ b/pkg/types/rekord/v0.0.1/entry.go @@ -307,7 +307,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { } canonicalEntry := models.RekordV001Schema{} - canonicalEntry.ExtraData = v.RekordObj.ExtraData // need to canonicalize signature & key content canonicalEntry.Signature = &models.RekordV001SchemaSignature{} @@ -331,9 +330,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { canonicalEntry.Data.Hash = v.RekordObj.Data.Hash // data content is not set deliberately - // ExtraData is copied through unfiltered - canonicalEntry.ExtraData = v.RekordObj.ExtraData - // wrap in valid object with kind and apiVersion set rekordObj := models.Rekord{} rekordObj.APIVersion = swag.String(APIVERSION) diff --git a/pkg/types/rekord/v0.0.1/entry_test.go b/pkg/types/rekord/v0.0.1/entry_test.go index 5c4016484..67258640f 100644 --- a/pkg/types/rekord/v0.0.1/entry_test.go +++ b/pkg/types/rekord/v0.0.1/entry_test.go @@ -498,27 +498,6 @@ func TestCrossFieldValidation(t *testing.T) { expectUnmarshalSuccess: true, expectCanonicalizeSuccess: true, }, - { - caseDesc: "valid obj with extradata", - entry: V001Entry{ - RekordObj: models.RekordV001Schema{ - Signature: &models.RekordV001SchemaSignature{ - Format: "pgp", - Content: strfmt.Base64(sigBytes), - PublicKey: &models.RekordV001SchemaSignaturePublicKey{ - Content: strfmt.Base64(keyBytes), - }, - }, - Data: &models.RekordV001SchemaData{ - Content: strfmt.Base64(dataBytes), - }, - ExtraData: []byte("{\"something\": \"here\""), - }, - }, - hasExtEntities: false, - expectUnmarshalSuccess: true, - expectCanonicalizeSuccess: true, - }, } for _, tc := range testCases { diff --git a/pkg/types/rekord/v0.0.1/rekord_v0_0_1_schema.json b/pkg/types/rekord/v0.0.1/rekord_v0_0_1_schema.json index 402161baa..14341b7fb 100644 --- a/pkg/types/rekord/v0.0.1/rekord_v0_0_1_schema.json +++ b/pkg/types/rekord/v0.0.1/rekord_v0_0_1_schema.json @@ -101,11 +101,6 @@ "required": [ "content" ] } ] - }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true } }, "required": [ "signature", "data" ] diff --git a/pkg/types/rfc3161/v0.0.1/entry.go b/pkg/types/rfc3161/v0.0.1/entry.go index 8d9af9432..118c8f692 100644 --- a/pkg/types/rfc3161/v0.0.1/entry.go +++ b/pkg/types/rfc3161/v0.0.1/entry.go @@ -128,9 +128,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { }, } - // ExtraData is copied through unfiltered - canonicalEntry.ExtraData = v.Rfc3161Obj.ExtraData - // wrap in valid object with kind and apiVersion set ref3161Obj := models.Rfc3161{} ref3161Obj.APIVersion = swag.String(APIVERSION) diff --git a/pkg/types/rfc3161/v0.0.1/entry_test.go b/pkg/types/rfc3161/v0.0.1/entry_test.go index 663270a4f..72f90d8b7 100644 --- a/pkg/types/rfc3161/v0.0.1/entry_test.go +++ b/pkg/types/rfc3161/v0.0.1/entry_test.go @@ -152,19 +152,6 @@ func TestCrossFieldValidation(t *testing.T) { expectCanonicalizeSuccess: false, expectValidationErrorMessage: "tsr verification error", }, - { - caseDesc: "valid obj with extra data", - entry: V001Entry{ - Rfc3161Obj: models.Rfc3161V001Schema{ - Tsr: &models.Rfc3161V001SchemaTsr{ - Content: p(tsrBytes), - }, - ExtraData: []byte("{\"something\": \"here\""), - }, - }, - expectUnmarshalSuccess: true, - expectCanonicalizeSuccess: true, - }, } for _, tc := range testCases { diff --git a/pkg/types/rfc3161/v0.0.1/rfc3161_v0_0_1_schema.json b/pkg/types/rfc3161/v0.0.1/rfc3161_v0_0_1_schema.json index effcbfa6f..de9e2f9a7 100644 --- a/pkg/types/rfc3161/v0.0.1/rfc3161_v0_0_1_schema.json +++ b/pkg/types/rfc3161/v0.0.1/rfc3161_v0_0_1_schema.json @@ -16,11 +16,6 @@ } }, "required": [ "content" ] - }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true } }, "required": [ "tsr" ] diff --git a/pkg/types/rpm/v0.0.1/entry.go b/pkg/types/rpm/v0.0.1/entry.go index b0ebaf52a..449cfa3fd 100644 --- a/pkg/types/rpm/v0.0.1/entry.go +++ b/pkg/types/rpm/v0.0.1/entry.go @@ -286,7 +286,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { } canonicalEntry := models.RpmV001Schema{} - canonicalEntry.ExtraData = v.RPMModel.ExtraData var err error // need to canonicalize key content @@ -319,9 +318,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { canonicalEntry.Package.Headers["RPMSIGTAG_SHA256"] = hex.EncodeToString(sha256sum) } - // ExtraData is copied through unfiltered - canonicalEntry.ExtraData = v.RPMModel.ExtraData - // wrap in valid object with kind and apiVersion set rpm := models.Rpm{} rpm.APIVersion = swag.String(APIVERSION) diff --git a/pkg/types/rpm/v0.0.1/entry_test.go b/pkg/types/rpm/v0.0.1/entry_test.go index cb49b12ee..1588ed0a4 100644 --- a/pkg/types/rpm/v0.0.1/entry_test.go +++ b/pkg/types/rpm/v0.0.1/entry_test.go @@ -346,23 +346,6 @@ func TestCrossFieldValidation(t *testing.T) { expectUnmarshalSuccess: true, expectCanonicalizeSuccess: true, }, - { - caseDesc: "valid obj with extradata", - entry: V001Entry{ - RPMModel: models.RpmV001Schema{ - PublicKey: &models.RpmV001SchemaPublicKey{ - Content: strfmt.Base64(keyBytes), - }, - Package: &models.RpmV001SchemaPackage{ - Content: strfmt.Base64(dataBytes), - }, - ExtraData: []byte("{\"something\": \"here\""), - }, - }, - hasExtEntities: false, - expectUnmarshalSuccess: true, - expectCanonicalizeSuccess: true, - }, } for _, tc := range testCases { diff --git a/pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json b/pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json index b31d60e10..2ed5caa6e 100644 --- a/pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json +++ b/pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json @@ -79,11 +79,6 @@ "required": [ "content" ] } ] - }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true } }, "required": [ "publicKey", "package" ] diff --git a/pkg/types/tuf/v0.0.1/entry.go b/pkg/types/tuf/v0.0.1/entry.go index 3226a5247..012f41b14 100644 --- a/pkg/types/tuf/v0.0.1/entry.go +++ b/pkg/types/tuf/v0.0.1/entry.go @@ -294,7 +294,6 @@ func (v *V001Entry) Canonicalize(ctx context.Context) ([]byte, error) { } canonicalEntry := models.TUFV001Schema{} - canonicalEntry.ExtraData = v.TufObj.ExtraData var err error canonicalEntry.SpecVersion, err = v.keyObj.(*ptuf.PublicKey).SpecVersion() diff --git a/pkg/types/tuf/v0.0.1/entry_test.go b/pkg/types/tuf/v0.0.1/entry_test.go index f6d95f9ff..dd1b899ba 100644 --- a/pkg/types/tuf/v0.0.1/entry_test.go +++ b/pkg/types/tuf/v0.0.1/entry_test.go @@ -224,23 +224,6 @@ func TestCrossFieldValidation(t *testing.T) { expectUnmarshalSuccess: true, expectCanonicalizeSuccess: true, }, - { - caseDesc: "valid obj with extradata", - entry: V001Entry{ - TufObj: models.TUFV001Schema{ - Root: &models.TUFV001SchemaRoot{ - Content: keyContent, - }, - Metadata: &models.TUFV001SchemaMetadata{ - Content: dataContent, - }, - ExtraData: []byte("{\"something\": \"here\""), - }, - }, - hasExtEntities: false, - expectUnmarshalSuccess: true, - expectCanonicalizeSuccess: true, - }, } for _, tc := range testCases { diff --git a/pkg/types/tuf/v0.0.1/tuf_v0_0_1_schema.json b/pkg/types/tuf/v0.0.1/tuf_v0_0_1_schema.json index 81469cb4e..9f1c3cd73 100644 --- a/pkg/types/tuf/v0.0.1/tuf_v0_0_1_schema.json +++ b/pkg/types/tuf/v0.0.1/tuf_v0_0_1_schema.json @@ -45,11 +45,6 @@ "writeOnly": true } } - }, - "extraData": { - "description": "Arbitrary content to be included in the verifiable entry in the transparency log", - "type": "object", - "additionalProperties": true } }, "required": [ "metadata" , "root"]