From 4933446bd1e687b9a5aa3a56f783ed537803b73e Mon Sep 17 00:00:00 2001 From: Will Vigor Date: Tue, 11 Jun 2024 14:46:24 +0100 Subject: [PATCH 1/3] Add LookupKeyById command --- .../ops/reconciliation/LookupKeyById.avsc | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/LookupKeyById.avsc diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/LookupKeyById.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/LookupKeyById.avsc new file mode 100644 index 000000000..6993dfa29 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/LookupKeyById.avsc @@ -0,0 +1,20 @@ +{ + "type": "record", + "name": "LookUpKeyById", + "namespace": "net.corda.data.crypto.wire.ops.reconciliation", + "doc": "Request to lookup for keys by their key ids. The maximum number of items is 20", + "fields": [ + { + "name": "keyIds", + "type": [ + "net.corda.data.crypto.ShortHashes", + "net.corda.data.crypto.SecureHashes" + ], + "doc": "List of key ids" + }, + { + "name": "tenantId", + "type": "string" + } + ] +} \ No newline at end of file From 67ed31946fa6fa72f2d1a8f4cc8140cfc95c97e0 Mon Sep 17 00:00:00 2001 From: Will Vigor Date: Wed, 12 Jun 2024 13:26:37 +0100 Subject: [PATCH 2/3] Improve avro schema --- .../{ => request}/LookupKeyById.avsc | 2 +- .../response/LookupKeyByIdError.avsc | 12 ++++++++++++ .../response/LookupKeyByIdResponse.avsc | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) rename data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/{ => request}/LookupKeyById.avsc (84%) create mode 100644 data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdError.avsc create mode 100644 data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdResponse.avsc diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/LookupKeyById.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/request/LookupKeyById.avsc similarity index 84% rename from data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/LookupKeyById.avsc rename to data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/request/LookupKeyById.avsc index 6993dfa29..19e9b33f8 100644 --- a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/LookupKeyById.avsc +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/request/LookupKeyById.avsc @@ -1,7 +1,7 @@ { "type": "record", "name": "LookUpKeyById", - "namespace": "net.corda.data.crypto.wire.ops.reconciliation", + "namespace": "net.corda.data.crypto.wire.ops.reconciliation.request", "doc": "Request to lookup for keys by their key ids. The maximum number of items is 20", "fields": [ { diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdError.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdError.avsc new file mode 100644 index 000000000..79975f26b --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdError.avsc @@ -0,0 +1,12 @@ +{ + "type": "record", + "name": "LookupKeyByIdError", + "namespace": "net.corda.data.crypto.wire.ops.reconciliation.response", + "doc": "Error result when looking up a key by Id.", + "fields": [ + { + "name": "errorMessage", + "type": "net.corda.data.ExceptionEnvelope" + } + ] +} \ No newline at end of file diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdResponse.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdResponse.avsc new file mode 100644 index 000000000..786767223 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdResponse.avsc @@ -0,0 +1,16 @@ +{ + "type": "record", + "name": "LookupKeyByIdResponse", + "namespace": "net.corda.data.crypto.wire.ops.reconciliation.response", + "doc": "Result of the Lookup key by ID operation", + "fields": [ + { + "name": "response", + "type": [ + "net.corda.data.crypto.wire.CryptoSigningKeys", + "net.corda.data.crypto.wire.ops.reconciliation.response.LookupKeyByIdError" + ], + "doc": "Response's payload, depends on the requested operation" + } + ] +} \ No newline at end of file From 118e316dbb66c4b5a53012c7c69d3eba78ef6eaa Mon Sep 17 00:00:00 2001 From: Will Vigor Date: Thu, 27 Jun 2024 14:48:39 +0100 Subject: [PATCH 3/3] Respond to review comments --- .../ops/{reconciliation => sync}/request/LookupKeyById.avsc | 2 +- .../{reconciliation => sync}/response/LookupKeyByIdError.avsc | 2 +- .../response/LookupKeyByIdResponse.avsc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/{reconciliation => sync}/request/LookupKeyById.avsc (84%) rename data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/{reconciliation => sync}/response/LookupKeyByIdError.avsc (74%) rename data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/{reconciliation => sync}/response/LookupKeyByIdResponse.avsc (66%) diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/request/LookupKeyById.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/request/LookupKeyById.avsc similarity index 84% rename from data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/request/LookupKeyById.avsc rename to data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/request/LookupKeyById.avsc index 19e9b33f8..4d03eeeb1 100644 --- a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/request/LookupKeyById.avsc +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/request/LookupKeyById.avsc @@ -1,7 +1,7 @@ { "type": "record", "name": "LookUpKeyById", - "namespace": "net.corda.data.crypto.wire.ops.reconciliation.request", + "namespace": "net.corda.data.crypto.wire.ops.sync.request", "doc": "Request to lookup for keys by their key ids. The maximum number of items is 20", "fields": [ { diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdError.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/response/LookupKeyByIdError.avsc similarity index 74% rename from data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdError.avsc rename to data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/response/LookupKeyByIdError.avsc index 79975f26b..d80fce93a 100644 --- a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdError.avsc +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/response/LookupKeyByIdError.avsc @@ -1,7 +1,7 @@ { "type": "record", "name": "LookupKeyByIdError", - "namespace": "net.corda.data.crypto.wire.ops.reconciliation.response", + "namespace": "net.corda.data.crypto.wire.ops.sync.response", "doc": "Error result when looking up a key by Id.", "fields": [ { diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdResponse.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/response/LookupKeyByIdResponse.avsc similarity index 66% rename from data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdResponse.avsc rename to data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/response/LookupKeyByIdResponse.avsc index 786767223..2bef961e5 100644 --- a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/reconciliation/response/LookupKeyByIdResponse.avsc +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/sync/response/LookupKeyByIdResponse.avsc @@ -1,14 +1,14 @@ { "type": "record", "name": "LookupKeyByIdResponse", - "namespace": "net.corda.data.crypto.wire.ops.reconciliation.response", + "namespace": "net.corda.data.crypto.wire.ops.sync.response", "doc": "Result of the Lookup key by ID operation", "fields": [ { "name": "response", "type": [ "net.corda.data.crypto.wire.CryptoSigningKeys", - "net.corda.data.crypto.wire.ops.reconciliation.response.LookupKeyByIdError" + "net.corda.data.crypto.wire.ops.sync.response.LookupKeyByIdError" ], "doc": "Response's payload, depends on the requested operation" }