mirror of
https://github.com/corda/corda.git
synced 2025-05-09 12:02:56 +00:00
Backwards compat: Put the confidential-identities module back in the node classpath by default. Separating it out into a standalone "app" needs more thought and design work, if we do it at all.
This commit is contained in:
parent
69ba95a961
commit
1ed5fce6a6
@ -1,7 +1,5 @@
|
|||||||
// Experimental Confidential Identities support for 1.0
|
// This contains the SwapIdentitiesFlow which can be used for exchanging confidential identities as part of a flow.
|
||||||
// This contains the prototype SwapIdentitiesFlow and SwapIdentitiesHandler, which can be used
|
// TODO: Merge this into core: the original plan was to develop it independently but in practice it's too widely used to break compatibility now, as finance uses it.
|
||||||
// for exchanging confidential identities as part of a flow, until a permanent solution is prepared.
|
|
||||||
// Expect this module to be removed and merged into core in a later release.
|
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply plugin: CanonicalizerPlugin
|
apply plugin: CanonicalizerPlugin
|
||||||
apply plugin: 'net.corda.plugins.publish-utils'
|
apply plugin: 'net.corda.plugins.publish-utils'
|
||||||
@ -27,17 +25,6 @@ dependencies {
|
|||||||
testCompile "org.assertj:assertj-core:$assertj_version"
|
testCompile "org.assertj:assertj-core:$assertj_version"
|
||||||
}
|
}
|
||||||
|
|
||||||
cordapp {
|
|
||||||
targetPlatformVersion corda_platform_version.toInteger()
|
|
||||||
minimumPlatformVersion 1
|
|
||||||
workflow {
|
|
||||||
name "Corda Experimental Confidential Identities"
|
|
||||||
versionId 1
|
|
||||||
vendor "R3"
|
|
||||||
licence "Open Source (Apache 2)"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
baseName 'corda-confidential-identities'
|
baseName 'corda-confidential-identities'
|
||||||
}
|
}
|
||||||
|
@ -124,14 +124,4 @@ private constructor(private val otherSideSession: FlowSession?,
|
|||||||
@CordaSerializable
|
@CordaSerializable
|
||||||
data class CertificateOwnershipAssertion(val x500Name: CordaX500Name, val publicKey: PublicKey)
|
data class CertificateOwnershipAssertion(val x500Name: CordaX500Name, val publicKey: PublicKey)
|
||||||
|
|
||||||
open class SwapIdentitiesException @JvmOverloads constructor(message: String, cause: Throwable? = null) : FlowException(message, cause)
|
open class SwapIdentitiesException @JvmOverloads constructor(message: String, cause: Throwable? = null) : FlowException(message, cause)
|
||||||
|
|
||||||
// This only exists for backwards compatibility
|
|
||||||
@InitiatedBy(SwapIdentitiesFlow::class)
|
|
||||||
private class SwapIdentitiesHandler(private val otherSide: FlowSession) : FlowLogic<Unit>() {
|
|
||||||
@Suspendable
|
|
||||||
override fun call() {
|
|
||||||
subFlow(SwapIdentitiesFlow(otherSide))
|
|
||||||
logger.warnOnce("Insecure API to swap anonymous identities was used by ${otherSide.counterparty} (${otherSide.getCounterpartyFlowInfo()})")
|
|
||||||
}
|
|
||||||
}
|
|
@ -74,9 +74,6 @@ Version 4.0
|
|||||||
|
|
||||||
* Fixed a problem that was preventing `Cash.generateSpend` to be used more than once per transaction (https://github.com/corda/corda/issues/4110).
|
* Fixed a problem that was preventing `Cash.generateSpend` to be used more than once per transaction (https://github.com/corda/corda/issues/4110).
|
||||||
|
|
||||||
* The experimental confidential-identities is now a separate CorDapp and must now be loaded onto the node alongside any CorDapp that needs it.
|
|
||||||
This also means your gradle dependency for it should be ``cordapp`` and not ``cordaCompile``.
|
|
||||||
|
|
||||||
* Fixed a bug resulting in poor vault query performance and incorrect results when sorting.
|
* Fixed a bug resulting in poor vault query performance and incorrect results when sorting.
|
||||||
|
|
||||||
* Improved exception thrown by `AttachmentsClassLoader` when an attachment cannot be used because its uploader is not trusted.
|
* Improved exception thrown by `AttachmentsClassLoader` when an attachment cannot be used because its uploader is not trusted.
|
||||||
|
@ -292,12 +292,6 @@ The TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 family of ciphers is retired from the li
|
|||||||
as it is a legacy cipher family not supported by all native SSL/TLS implementations. We anticipate that this
|
as it is a legacy cipher family not supported by all native SSL/TLS implementations. We anticipate that this
|
||||||
will have no impact on any deployed configurations.
|
will have no impact on any deployed configurations.
|
||||||
|
|
||||||
Confidential identities
|
|
||||||
+++++++++++++++++++++++
|
|
||||||
|
|
||||||
If any of your CorDapps use the experimental confidential-identities module then it also needs to be loaded as a separate CorDapp jar. This
|
|
||||||
includes the demo finance CorDapp.
|
|
||||||
|
|
||||||
Miscellaneous changes
|
Miscellaneous changes
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ dependencies {
|
|||||||
// cordapp project(':finance:workflows')
|
// cordapp project(':finance:workflows')
|
||||||
// cordapp project(':finance:contracts')
|
// cordapp project(':finance:contracts')
|
||||||
cordaCompile project(':core')
|
cordaCompile project(':core')
|
||||||
|
cordaCompile project(':confidential-identities')
|
||||||
|
|
||||||
cordapp project(':confidential-identities')
|
|
||||||
cordapp project(':finance:contracts')
|
cordapp project(':finance:contracts')
|
||||||
|
|
||||||
// For JSON
|
// For JSON
|
||||||
|
@ -73,6 +73,10 @@ dependencies {
|
|||||||
compile project(':tools:cliutils')
|
compile project(':tools:cliutils')
|
||||||
compile project(':common-validation')
|
compile project(':common-validation')
|
||||||
compile project(':common-configuration-parsing')
|
compile project(':common-configuration-parsing')
|
||||||
|
|
||||||
|
// Backwards compatibility goo: Apps expect confidential-identities to be loaded by default.
|
||||||
|
// We could eventually gate this on a target-version check.
|
||||||
|
compile project(':confidential-identities')
|
||||||
|
|
||||||
// Log4J: logging framework (with SLF4J bindings)
|
// Log4J: logging framework (with SLF4J bindings)
|
||||||
compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}"
|
compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}"
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
package net.corda.node.internal
|
||||||
|
|
||||||
|
import co.paralleluniverse.fibers.Suspendable
|
||||||
|
import net.corda.confidential.SwapIdentitiesFlow
|
||||||
|
import net.corda.core.flows.FlowLogic
|
||||||
|
import net.corda.core.flows.FlowSession
|
||||||
|
import net.corda.core.flows.InitiatedBy
|
||||||
|
import net.corda.core.internal.warnOnce
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Exists for backwards compatibility - the old confidential-identities API didn't use inlined flows. One day we'll need to disable this,
|
||||||
|
* but it is a complex versioning problem because we don't know which peers we might interact with. Disabling it will probably have to be
|
||||||
|
* gated on a minPlatformVersion bump.
|
||||||
|
*/
|
||||||
|
@InitiatedBy(SwapIdentitiesFlow::class)
|
||||||
|
class SwapIdentitiesHandler(private val otherSide: FlowSession) : FlowLogic<Unit>() {
|
||||||
|
@Suspendable
|
||||||
|
override fun call() {
|
||||||
|
subFlow(SwapIdentitiesFlow(otherSide))
|
||||||
|
logger.warnOnce("Insecure API to swap anonymous identities was used by ${otherSide.counterparty} (${otherSide.getCounterpartyFlowInfo()})")
|
||||||
|
}
|
||||||
|
}
|
@ -11,7 +11,6 @@ dependencies {
|
|||||||
// The bank of corda CorDapp depends upon Cash CorDapp features
|
// The bank of corda CorDapp depends upon Cash CorDapp features
|
||||||
cordapp project(':finance:contracts')
|
cordapp project(':finance:contracts')
|
||||||
cordapp project(':finance:workflows')
|
cordapp project(':finance:workflows')
|
||||||
cordapp project(':confidential-identities')
|
|
||||||
|
|
||||||
// Corda integration dependencies
|
// Corda integration dependencies
|
||||||
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
|
||||||
@ -35,7 +34,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask,
|
|||||||
nodeDefaults {
|
nodeDefaults {
|
||||||
cordapp project(':finance:workflows')
|
cordapp project(':finance:workflows')
|
||||||
cordapp project(':finance:contracts')
|
cordapp project(':finance:contracts')
|
||||||
cordapp project(':confidential-identities')
|
|
||||||
}
|
}
|
||||||
node {
|
node {
|
||||||
name "O=Notary Service,L=Zurich,C=CH"
|
name "O=Notary Service,L=Zurich,C=CH"
|
||||||
|
@ -9,7 +9,6 @@ dependencies {
|
|||||||
// The trader demo CorDapp depends upon Cash CorDapp features
|
// The trader demo CorDapp depends upon Cash CorDapp features
|
||||||
cordapp project(':finance:contracts')
|
cordapp project(':finance:contracts')
|
||||||
cordapp project(':finance:workflows')
|
cordapp project(':finance:workflows')
|
||||||
cordapp project(':confidential-identities')
|
|
||||||
cordapp project(':samples:bank-of-corda-demo')
|
cordapp project(':samples:bank-of-corda-demo')
|
||||||
cordapp project(':samples:trader-demo:workflows-trader')
|
cordapp project(':samples:trader-demo:workflows-trader')
|
||||||
|
|
||||||
@ -32,7 +31,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar', nodeTask,
|
|||||||
}
|
}
|
||||||
cordapp project(':finance:workflows')
|
cordapp project(':finance:workflows')
|
||||||
cordapp project(':finance:contracts')
|
cordapp project(':finance:contracts')
|
||||||
cordapp project(':confidential-identities')
|
|
||||||
cordapp project(':samples:trader-demo:workflows-trader')
|
cordapp project(':samples:trader-demo:workflows-trader')
|
||||||
}
|
}
|
||||||
directory "./build/nodes"
|
directory "./build/nodes"
|
||||||
|
@ -138,11 +138,6 @@ distributions {
|
|||||||
into 'cordapps'
|
into 'cordapps'
|
||||||
fileMode = 0444
|
fileMode = 0444
|
||||||
}
|
}
|
||||||
from(project(':confidential-identities').tasks.jar) {
|
|
||||||
rename 'corda-confidential-identities(.*)', 'corda-confidential-identities.jar'
|
|
||||||
into 'cordapps'
|
|
||||||
fileMode = 0444
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,7 @@ class CordappController : Controller() {
|
|||||||
private val cordappDir: Path = jvm.applicationDir / NodeConfig.CORDAPP_DIR_NAME
|
private val cordappDir: Path = jvm.applicationDir / NodeConfig.CORDAPP_DIR_NAME
|
||||||
private val cordappJars = setOf(
|
private val cordappJars = setOf(
|
||||||
cordappDir / "$FINANCE_CONTRACTS_CORDAPP_FILENAME.jar",
|
cordappDir / "$FINANCE_CONTRACTS_CORDAPP_FILENAME.jar",
|
||||||
cordappDir / "$FINANCE_WORKFLOWS_CORDAPP_FILENAME.jar",
|
cordappDir / "$FINANCE_WORKFLOWS_CORDAPP_FILENAME.jar"
|
||||||
cordappDir / "corda-confidential-identities.jar"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user