corda-runtime-os icon indicating copy to clipboard operation
corda-runtime-os copied to clipboard

CORE-6717 Add persistence and reconciliation for hosted identities

Open YashNabar opened this issue 1 year ago • 2 comments

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:

  1. Onboarded MGM and two members on a single cluster. image image

  2. When db entry is modified, reconciler writes updated record to Kafka.

UPDATE config.hosted_identity SET version=2 WHERE holding_identity_id='8671B97101D2';
image
  1. Network REST API can be called again to update hosted identity information. image
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
}'

image image

YashNabar avatar Apr 29 '24 10:04 YashNabar

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

corda-jenkins-ci02[bot] avatar Apr 29 '24 14:04 corda-jenkins-ci02[bot]