Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 179 GitHub source documents. All source documents are searchable here.
Last updated: October 7, 2025
This content is meant to be consumed by AI agents via MCP. Click here to get the MCP configuration.
Note: In rare cases it may contain LLM hallucinations.
For authoritative documentation, please consult the official GLEIF vLEI trainings and the ToIP Glossary.
The 'rules' section (field 'r') is a top-level field map within an ACDC that embeds legal language in the form of Ricardian Contracts, providing both human-readable and machine-readable contractual terms that govern credential usage, issuance, and disclosure policies.
The rules section is a top-level field map within an ACDC (Authentic Chained Data Container) that serves to embed legal language and contractual terms directly into verifiable credentials. This section implements the concept of Ricardian Contracts—legal agreements that are both human-readable and machine-readable, enabling automated policy enforcement while maintaining legal validity.
The rules section addresses a fundamental challenge in verifiable credential systems: how to attach legally binding terms and conditions to credentials in a way that:
The rules section is particularly critical in the vLEI (verifiable Legal Entity Identifier) ecosystem, where credentials must carry explicit disclaimers about usage limitations, liability, and the scope of assertions being made.
The rules section follows the standard ACDC pattern of supporting dual representation:
Compact Form: The rules field ('r') contains only the SAID of the rules block:
When implementing rules sections, SAID computation must follow strict procedures:
Dual Representation Support: Schemas must use oneOf to support both string (compact) and object (full) representations of the rules field.
Required Fields: Carefully consider which rule fields should be required vs. optional based on credential type and legal requirements.
Const Constraints: Use const constraints to enforce specific legal text when consistency across all credentials of a type is required.
Additional Properties: Set additionalProperties: false to prevent schema extensions that might introduce unintended legal obligations.
Initial Issuance: Decide whether to issue credentials in compact or full form based on:
Presentation Strategy: Implement logic to transition from compact to full disclosure based on:
Expert Consultation: Have legal experts draft and review all rules text before embedding in schemas.
Jurisdiction Specificity: Consider creating schema variants for different jurisdictions with appropriate legal language.
Version Management: Maintain clear versioning of schemas when legal terms change, ensuring old credentials remain valid under their original terms.
SAID Verification: Always verify rules SAIDs when credentials are presented in full form.
{
"r": "EG71iheqcywJcnjtJtQIYPvAu6DZIl3MORH3dCdoFOLB"
}
Full Form: The rules field contains the complete rules object with its own SAID:
{
"r": {
"d": "EG71iheqcywJcnjtJtQIYPvAu6DZIl3MORH3dCdoFOLB",
"usageDisclaimer": "Legal language governing credential usage...",
"issuanceDisclaimer": "Legal language about issuance conditions..."
}
}
This dual representation enables selective disclosure patterns where:
The rules section typically contains several types of legal clauses:
Usage Disclaimers: Define how the credential may be used, what it does and does not assert, and limitations on reliance. For example, vLEI credentials include disclaimers stating that possession of a valid credential does not assert trustworthiness or legal compliance of the holder.
Issuance Disclaimers: Describe the conditions under which the credential was issued, the verification processes performed, and the issuer's liability limitations. These often include statements about accuracy as of the validation date and reasonable care in the validation process.
Privacy Policies: May include terms governing how disclosed information can be used, stored, or shared by the recipient. These support chain-link confidentiality mechanisms where usage restrictions propagate through credential presentations.
Revocation Terms: Can specify conditions under which credentials may be revoked and the obligations of parties when revocation occurs.
Jurisdiction and Dispute Resolution: May specify applicable law, venue for disputes, and arbitration procedures.
The rules section is identified by the field label 'r' at the top level of an ACDC. The value can be:
Common field names in vLEI credentials include:
usageDisclaimer: Terms governing credential usageissuanceDisclaimer: Terms about credential issuanceprivacyPolicy: Data handling requirementsliabilityLimitation: Scope of issuer liabilityRules sections follow standard ACDC encoding requirements:
Serialization: Must support JSON, CBOR, and MGPK serializations with insertion-ordered field maps to ensure deterministic SAID computation.
SAID Generation: The rules block SAID is computed by:
Text Encoding: Legal text within rules fields uses standard JSON string encoding with Unicode support for internationalization.
Rules sections have no fixed size limits but practical considerations include:
Compactness: While legal text can be verbose, credential designers should balance completeness with transmission efficiency. Typical vLEI rules sections range from a few hundred to a few thousand characters.
Immutability: Once a rules SAID is embedded in a credential and signed by the issuer, the rules content is cryptographically fixed. Any change to the rules text produces a different SAID, making tampering evident.
Schema Validation: Rules sections must conform to the credential's JSON Schema, which may specify:
Rules sections are created during credential schema design and populated during credential issuance:
Schema Design Phase:
const constraints to enforce specific legal textCredential Issuance Phase:
Rules sections are immutable once issued due to SAID binding:
No In-Place Updates: The rules content cannot be modified after issuance without invalidating the credential signature.
Version Management: If rules need to change:
Disclosure Transitions: A credential can transition from compact to full disclosure:
Verifiers must validate rules sections through multiple checks:
SAID Verification:
Schema Compliance:
const values)Legal Review:
Policy Enforcement:
Rules sections are used across the KERI/ACDC protocol stack:
ACDC Specification: Defines the rules section as an optional top-level field in all ACDCs, enabling any credential type to carry contractual terms.
IPEX Protocol: The Issuance and Presentation Exchange protocol supports contractually protected disclosure, where rules sections establish the legal framework for graduated disclosure:
vLEI Ecosystem: Rules sections are mandatory in vLEI credentials:
CESR-Proof Format: When credentials are signed using CESR Proof Signatures, the rules section is included in the signed content, ensuring non-repudiable commitment to the contractual terms.
Rules sections participate in the full credential lifecycle:
Issuance: Rules are embedded during credential creation and become part of the signed commitment.
Storage: Credentials may be stored in compact form (rules SAID only) to save space, with full rules retrievable from schema registries or issuer services.
Presentation: Holders choose whether to present rules in compact or full form based on:
Verification: Verifiers validate rules SAIDs and assess legal terms before accepting credentials.
Revocation: Rules may specify conditions triggering revocation and obligations when credentials are revoked.
Rules sections interact with other ACDC components:
Attributes Section ('a'): Rules govern how attribute data may be used, creating a binding between data and usage policy.
Edges Section ('e'): Rules can propagate through credential chains via edges, implementing chain-link confidentiality where usage restrictions flow from parent to child credentials.
Schema Section ('s'): The schema defines the structure and constraints for the rules section, potentially enforcing specific legal text through const constraints.
Registry ('ri'): Rules may reference credential registries for revocation checking, with contractual terms about revocation obligations.
The vLEI ecosystem provides concrete examples of rules section implementation:
QVI Credential Rules: Include disclaimers that valid credentials do not assert trustworthiness or legal compliance, and statements about accuracy as of validation date.
Legal Entity Credential Rules: Specify that the credential verifies LEI validity but does not assert business trustworthiness or regulatory compliance.
Role Credential Rules: Include privacy disclaimers specific to IPEX/ACDC presentation exchanges and limitations on role authority assertions.
Rules sections enable sophisticated disclosure patterns:
Progressive Revelation:
Chain-Link Confidentiality:
While rules sections primarily contain human-readable legal text, they can include machine-readable policy elements:
Structured Policy Data: JSON objects within rules fields can encode:
Policy Enforcement: Automated systems can:
The rules section's security depends on SAID-based cryptographic binding:
Tamper Evidence: Any modification to rules text changes the SAID, making tampering immediately detectable.
Non-Repudiation: The issuer's signature on the credential creates a non-repudiable commitment to the rules content.
Integrity Verification: Verifiers can independently verify that rules content matches the SAID commitment.
For rules sections to be legally enforceable:
Clear Language: Legal text must be unambiguous and understandable.
Mutual Agreement: Presentation exchange protocols should ensure recipients explicitly accept terms.
Jurisdiction: Rules should specify applicable law and dispute resolution mechanisms.
Record Keeping: All parties should maintain records of rules acceptance and credential presentations.
Rules sections support privacy through:
Compact Disclosure: Initial presentations can hide legal text while proving commitment via SAID.
Selective Revelation: Different rules clauses can be disclosed at different stages.
Usage Restrictions: Rules can limit how disclosed data may be used, stored, or shared.
Chain-Link Confidentiality: Usage restrictions propagate through credential chains, protecting data across multiple disclosure events.
Schema Validation: Validate rules structure against the credential schema before accepting credentials.
Policy Extraction: Implement parsers to extract machine-readable policy elements from rules sections for automated enforcement.
Audit Logging: Log all rules acceptances and credential presentations for compliance and dispute resolution.
Caching: Cache frequently used rules blocks to avoid repeated SAID computations and schema validations.
Lazy Loading: In compact form, defer loading full rules text until needed for presentation or verification.
Compression: Consider compressing rules text in storage while maintaining ability to reconstruct exact content for SAID verification.
Standard Clauses: Use standardized clause names (usageDisclaimer, issuanceDisclaimer, etc.) for interoperability across implementations.
Schema Registry: Publish schemas to registries so verifiers can retrieve full rules content from compact SAIDs.
IPEX Integration: Ensure rules sections work correctly with IPEX protocol flows for contractually protected disclosure.