corda-runtime-os
corda-runtime-os copied to clipboard
CORE-6717 Add persistence and reconciliation for hosted identities
Introduces persistence and reconciliation for locally-hosted identities.
When the Network REST API's setup endpoint is called, the hosted identity entry is persisted to the cluster database, and subsequently published to Kafka. Repeated calls to this endpoint overwrite the previous hosted identity information for that virtual node. The reconciliation logic ensures that the data on Kafka and the database remain in sync, and that Kafka records can be recovered from the database in case of Kafka data loss.
Requires https://github.com/corda/corda-api/pull/1620
Testing:
-
Onboarded MGM and two members on a single cluster.
-
When db entry is modified, reconciler writes updated record to Kafka.
UPDATE config.hosted_identity SET version=2 WHERE holding_identity_id='8671B97101D2';
- Network REST API can be called again to update hosted identity information.
curl -X 'PUT' \
'https://localhost:8888/api/v5_2/network/setup/62F92B27A355' \
-H 'accept: */*' \
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
-H 'Content-Type: application/json' \
-d '{
"p2pTlsCertificateChainAlias": "cluster-tls",
"sessionKeysAndCertificates": [
{
"preferred": true,
"sessionKeyId": "981DD0CD4B6A"
},
{
"preferred": false,
"sessionKeyId": "D34EB9BB5714"
}
],
"useClusterLevelTlsCertificateAndKey": true
}'
Jenkins build for PR 6080 build 8
Build Successful: Jar artifact version produced by this PR: 5.2.1.0-alpha-1715253090872 Helm chart version produced by this PR: 5.2.1-alpha.1715253090872 Helm chart pushed to: oci://corda-os-docker-dev.software.r3.com/helm-charts/pr-6080/corda Helm chart Polaris score: 82
Quality Gate passed
Issues
4 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code