-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORE-18635 Avro schemas for session encryption operations #1400
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c8a1203
CORE-18635 Avro schemas for session encryption
YashNabar 27bea31
Split response
yift-r3 b5fc49f
Remove nullability
yift-r3 b2218fa
Add alias
yift-r3 7d5eb02
Merge branch 'release/os/5.2' into yash/CORE-18635
yift-r3 d02119b
Fix mistake
yift-r3 0eaefca
Merge branch 'release/os/5.2' into yash/CORE-18635
yift-r3 c9d4952
Merge branch 'release/os/5.2' into yash/CORE-18635
yift-r3 8b46198
Apply review comment
yift-r3 0db079d
Remove context
yift-r3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...n/resources/avro/net/corda/data/crypto/wire/ops/encryption/request/DecryptRpcCommand.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"type": "record", | ||
"name": "DecryptRpcCommand", | ||
"namespace": "net.corda.data.crypto.wire.ops.encryption.request", | ||
"doc": "Request to decrypt the given byte array", | ||
"fields": [ | ||
{ | ||
"name": "category", | ||
"type": "string", | ||
"doc": "The category of HSM e.g. ENCRYPTION_SECRET, TLS, etc." | ||
}, | ||
{ | ||
"name": "alias", | ||
"type": ["null", "string"], | ||
"doc": "The symmetric key alias." | ||
}, | ||
{ | ||
"name": "cipherBytes", | ||
"type": "bytes", | ||
"doc": "The data to decrypt." | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
...n/resources/avro/net/corda/data/crypto/wire/ops/encryption/request/EncryptRpcCommand.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"type": "record", | ||
"name": "EncryptRpcCommand", | ||
"namespace": "net.corda.data.crypto.wire.ops.encryption.request", | ||
"doc": "Request to encrypt the given byte array", | ||
"fields": [ | ||
{ | ||
"name": "category", | ||
"type": "string", | ||
"doc": "The category of HSM e.g. ENCRYPTION_SECRET, TLS, etc." | ||
}, | ||
{ | ||
"name": "alias", | ||
"type": ["null", "string"], | ||
"doc": "The symmetric key alias." | ||
}, | ||
{ | ||
"name": "plainBytes", | ||
"type": "bytes", | ||
"doc": "The data to encrypt." | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
...urces/avro/net/corda/data/crypto/wire/ops/encryption/response/CryptoDecryptionResult.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"type": "record", | ||
"name": "CryptoDecryptionResult", | ||
"namespace": "net.corda.data.crypto.wire.ops.encryption.response", | ||
"doc": "Decryption operation response", | ||
"fields": [ | ||
{ | ||
"name": "plainBytes", | ||
"type": "bytes", | ||
"doc": "Decrypted byte array" | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
...urces/avro/net/corda/data/crypto/wire/ops/encryption/response/CryptoEncryptionResult.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"type": "record", | ||
"name": "CryptoEncryptionResult", | ||
"namespace": "net.corda.data.crypto.wire.ops.encryption.response", | ||
"doc": "Encryption operation response", | ||
"fields": [ | ||
{ | ||
"name": "cipherBytes", | ||
"type": "bytes", | ||
"doc": "Encrypted byte array" | ||
} | ||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
...ources/avro/net/corda/data/crypto/wire/ops/encryption/response/DecryptionOpsResponse.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"type": "record", | ||
"name": "DecryptionOpsResponse", | ||
"namespace": "net.corda.data.crypto.wire.ops.encryption.response", | ||
"doc": "Response for crypto's decryption operations envelope", | ||
"fields": [ | ||
{ | ||
"name": "response", | ||
"type": [ | ||
"net.corda.data.crypto.wire.ops.encryption.response.CryptoDecryptionResult", | ||
"net.corda.data.crypto.wire.ops.encryption.response.EncryptionOpsError" | ||
], | ||
"doc": "Response's payload, depends on the requested operation" | ||
} | ||
] | ||
} |
12 changes: 12 additions & 0 deletions
12
...resources/avro/net/corda/data/crypto/wire/ops/encryption/response/EncryptionOpsError.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"type": "record", | ||
"name": "EncryptionOpsError", | ||
"namespace": "net.corda.data.crypto.wire.ops.encryption.response", | ||
"doc": "Error result while performing encryption or decryption operation.", | ||
"fields": [ | ||
{ | ||
"name": "errorMessage", | ||
"type": "net.corda.data.ExceptionEnvelope" | ||
} | ||
] | ||
} |
16 changes: 16 additions & 0 deletions
16
...ources/avro/net/corda/data/crypto/wire/ops/encryption/response/EncryptionOpsResponse.avsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"type": "record", | ||
"name": "EncryptionOpsResponse", | ||
"namespace": "net.corda.data.crypto.wire.ops.encryption.response", | ||
"doc": "Response for crypto's encryption operations envelope", | ||
"fields": [ | ||
{ | ||
"name": "response", | ||
"type": [ | ||
"net.corda.data.crypto.wire.ops.encryption.response.CryptoEncryptionResult", | ||
"net.corda.data.crypto.wire.ops.encryption.response.EncryptionOpsError" | ||
], | ||
"doc": "Response's payload, depends on the requested operation" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: so this means we could be passing in any category. So for example
LEDGER
(ledger keys are meant to be used for signing) to decrypt secrets. Should we be restricting this field with an enum of valid categories?