Skip to content
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

RFC: CORD Blockchain Integration for Identity, Schema, and Credential Anchoring in Sunbird RC #354

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

ashwin275
Copy link

@ashwin275 ashwin275 commented Nov 12, 2024

Overview

This RFC proposes the integration of the CORD blockchain into the Sunbird RC ecosystem to enable the anchoring of Decentralized Identifiers (DID), Schemas, and Verifiable Credentials (VCs). This feature will provide a secure, verifiable, and tamper-proof solution for credential issuers to anchor identities, schemas, and credentials on the blockchain.

The integration will be optional and configurable, allowing adopters to enable blockchain anchoring via environment variables, with the feature being disabled by default.

Motivation
For Sunbird RC adopters, anchoring credentials, identities, and schemas on a blockchain provides:

Immutable Proofs: Ensures that identities, schemas, and credentials remain secure and unaltered.

Verification: Provides a robust, distributed mechanism for validating the authenticity of entities and credentials.

Enhanced Trust: Blockchain anchoring adds a layer of transparency and trust to the verification of credentials, schemas,
and identities.

Design and Implementation

Architectural Overview
In this integration:

Sunbird RC does not interact with the CORD blockchain directly.

CORD Middleware is the entry point for all blockchain anchoring requests. Sunbird RC services connect to CORD
Middleware, which then handles the blockchain operations.

This architecture ensures modularity and simplifies maintenance by decoupling blockchain logic from Sunbird RC services.

Key Components Affected

The following Sunbird RC services will interact with the CORD Middleware for anchoring:

Identity Service - Anchors DIDs through the CORD middleware.

Schema Service - Sends schema anchoring requests to the middleware. A new column, blockchainStatus, has been
introduced in the VerifiableCredentialSchema table to track the anchoring status of each schema.

Credential Service - Handles VC issuance anchoring and VC verification requests through the middleware. A new
column, blockchainStatus, has been added to the VerifiableCredentials table to monitor the anchoring status of each
credential.

Configuration Requirements

Environment Variable Configuration
To enable blockchain anchoring, configure the following environment variables in Sunbird RC. By default, anchoring is disabled and can be enabled by setting ANCHOR_TO_CORD to true.

1.Anchoring DID and Schema to CORD
To anchor DIDs and schemas, set the following variables:
ANCHOR_TO_CORD = true ISSUER_AGENT_BASE_URL = https://<CORD_MIDDLEWARE_DOMAIN_OR_IP>/api/v1
2.Anchoring Verifiable Credentials to CORD

To enable VC anchoring, add the following:
VERIFICATION_MIDDLEWARE_BASE_URL=https://<CORD_MIDDLEWARE_IP_OR_DOMAIN>/api/v1/verify
These configurations instruct Sunbird RC to route all anchoring requests to the CORD middleware.

@pallakartheekreddy
Copy link
Contributor

pallakartheekreddy commented Nov 26, 2024

@ashwin275
Thanks for your contribution! Below are my observations:

1. CORD Implementation:
Could you refactor the CORD implementation to use an interface? For now, CORD is one implementation of the interface, but in the future, someone might need to add a Solana implementation or others.
2. Testing:
How did you test this implementation? Could you please share the test suite so that others can use it for validation?
3. Documentation:
I couldn’t find documentation for connecting RC with CORD. Can you please provide detailed steps or documentation for others to follow?

@surendrasinghs please feel free to add your comments if I’ve missed anything.

@ashwin275
Copy link
Author

  1. CORD Implementation:
    Could you refactor the CORD implementation to use an interface? For now, CORD is one implementation of the interface, but in the future, someone might need to add a Solana implementation or others.
  1. Testing:
    How did you test this implementation? Could you please share the test suite so that others can use it for validation?
  1. Documentation:
    I couldn’t find documentation for connecting RC with CORD. Can you please provide detailed steps or documentation for others to follow?

@pallakartheekreddy Thank you for the feedback!

CORD Implementation: I’ll refactor it to use an interface to make it flexible for future additions like Solana.

Testing: I’ll create a test suite for this and update it once it’s ready.

Documentation: The steps for connecting RC with CORD are already documented.

@ashwin275
Copy link
Author

ashwin275 commented Dec 18, 2024

@ashwin275 Thanks for your contribution! Below are my observations:

1. CORD Implementation: Could you refactor the CORD implementation to use an interface? For now, CORD is one implementation of the interface, but in the future, someone might need to add a Solana implementation or others. 2. Testing: How did you test this implementation? Could you please share the test suite so that others can use it for validation? 3. Documentation: I couldn’t find documentation for connecting RC with CORD. Can you please provide detailed steps or documentation for others to follow?

@surendrasinghs please feel free to add your comments if I’ve missed anything.

@pallakartheekreddy I've updated the code based on your feedback. I've created an interface for each service and added a test suite as well. and here is the detailed steps to integrate rc in to cord:
https://dhiway.atlassian.net/wiki/external/YjdkZTBjYzg5YWJkNDkwMDg5YTdkMjY3Zjk4MjA3N2Q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants