diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/request/DecryptRpcCommand.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/request/DecryptRpcCommand.avsc new file mode 100644 index 0000000000..3f5dfb4a9b --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/request/DecryptRpcCommand.avsc @@ -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." + } + ] +} \ No newline at end of file diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/request/EncryptRpcCommand.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/request/EncryptRpcCommand.avsc new file mode 100644 index 0000000000..25f3c51f39 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/request/EncryptRpcCommand.avsc @@ -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." + } + ] +} \ No newline at end of file diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/CryptoDecryptionResult.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/CryptoDecryptionResult.avsc new file mode 100644 index 0000000000..748bf66d52 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/CryptoDecryptionResult.avsc @@ -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" + } + ] +} \ No newline at end of file diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/CryptoEncryptionResult.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/CryptoEncryptionResult.avsc new file mode 100644 index 0000000000..8220da9f18 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/CryptoEncryptionResult.avsc @@ -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" + } + ] +} \ No newline at end of file diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/DecryptionOpsResponse.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/DecryptionOpsResponse.avsc new file mode 100644 index 0000000000..097dc64e8d --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/DecryptionOpsResponse.avsc @@ -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" + } + ] +} \ No newline at end of file diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/EncryptionOpsError.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/EncryptionOpsError.avsc new file mode 100644 index 0000000000..8398f939ee --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/EncryptionOpsError.avsc @@ -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" + } + ] +} diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/EncryptionOpsResponse.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/EncryptionOpsResponse.avsc new file mode 100644 index 0000000000..20bd5bd525 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/crypto/wire/ops/encryption/response/EncryptionOpsResponse.avsc @@ -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" + } + ] +} \ No newline at end of file diff --git a/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/state/SessionState.avsc b/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/state/SessionState.avsc new file mode 100644 index 0000000000..a1cc1a4fe3 --- /dev/null +++ b/data/avro-schema/src/main/resources/avro/net/corda/data/p2p/state/SessionState.avsc @@ -0,0 +1,17 @@ +{ + "type": "record", + "name": "SessionState", + "namespace": "net.corda.data.p2p.state", + "fields": [ + { + "doc": "The message.", + "name": "message", + "type": "net.corda.data.p2p.LinkOutMessage" + }, + { + "doc": "The encrypted session data.", + "name": "encryptedSessionData", + "type": "bytes" + } + ] +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 53bbd4f054..ecc8d115d6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,8 +26,6 @@ publicArtifactURL = https://download.corda.net/maven org.gradle.jvmargs=-Dfile.encoding=UTF-8 -XX:MaxMetaspaceSize=2g internalPluginVersion = 1.+ -gradleEnterpriseVersion = 3.14.1 -gradleDataPlugin = 1.8.2 org.gradle.caching = true gradleEnterpriseUrl = https://gradle.dev.r3.com diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 97ca51c435..51e6d88b41 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -28,7 +28,7 @@ cyclonedxVersion = "1.8.1" dokkaVersion = "1.8.20" detektVersion = "1.23.4" dependencyCheckVersion = "0.46.0" -gradleDataVersion = "1.8.2" +gradleDataVersion = "1.12.1" gradleEnterpriseVersion = "3.14.1" grgitVersion = "5.2.1" snykVersion = "0.4" diff --git a/settings.gradle b/settings.gradle index 58777008c1..87d6c01c62 100644 --- a/settings.gradle +++ b/settings.gradle @@ -22,11 +22,28 @@ pluginManagement { } gradlePluginPortal() } + } + // Manually parse the Toml file to workaround issues with version catalog + // not supporting direct use in settings.gradle + def tomlFile = new File(rootDir, 'gradle/libs.versions.toml') + def tomlContent = tomlFile.text + def extractVersion = { String name -> + def pattern = java.util.regex.Pattern.compile("${name}\\s*=\\s*\"([^\"]+)\"") + def matcher = pattern.matcher(tomlContent) + if (matcher.find()) { + return matcher.group(1) + } else { + return null + } } + + def gradleEnterpriseVersion = extractVersion('gradleEnterpriseVersion') + def gradleDataPluginVersion = extractVersion('gradleDataVersion') + plugins { id 'com.gradle.enterprise' version gradleEnterpriseVersion - id 'com.gradle.common-custom-user-data-gradle-plugin' version gradleDataPlugin + id 'com.gradle.common-custom-user-data-gradle-plugin' version gradleDataPluginVersion } } plugins {