|
| 1 | +--- |
| 2 | +sidebar_position: 4 |
| 3 | +--- |
| 4 | + |
| 5 | +# Registry |
| 6 | + |
| 7 | +The Registry is a core W3DS service that provides W3ID-based service discovery, entropy generation for cryptographic operations, and—as a temporary shortcut—key binding certificates. In the future, key binding will be provided by a Remote Notary (Remote CA). |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +The Registry enables clients and services to: |
| 12 | + |
| 13 | +- **Resolve W3IDs** to service endpoints (eVault URIs, platform URLs) |
| 14 | +- **Obtain entropy** as signed JWTs for use in provisioning and other operations |
| 15 | +- **Verify tokens** via a public JWK endpoint |
| 16 | + |
| 17 | +:::warning Remote Notary / Remote CA |
| 18 | + |
| 19 | +**Key binding certificates** are intended to be provided by a **Remote Notary** (Remote CA) in the future. The Registry currently provides them as a **shortcut** for the prototype. This function will be performed by a remote CA later; treat the Registry’s current behavior as temporary. |
| 20 | + |
| 21 | +::: |
| 22 | + |
| 23 | +## Architecture |
| 24 | + |
| 25 | +```mermaid |
| 26 | +graph TB |
| 27 | + subgraph Clients["Clients"] |
| 28 | + EVault[eVault Core] |
| 29 | + Platform[Platforms] |
| 30 | + Wallet[eID Wallet] |
| 31 | + end |
| 32 | +
|
| 33 | + subgraph Registry["Registry"] |
| 34 | + Resolve[GET /resolve] |
| 35 | + List[GET /list] |
| 36 | + Entropy[GET /entropy] |
| 37 | + JWKS["GET /.well-known/jwks.json"] |
| 38 | + end |
| 39 | +
|
| 40 | + subgraph RegistryAuth["Registry (temporary)"] |
| 41 | + KeyBinding[Key binding certificates] |
| 42 | + end |
| 43 | +
|
| 44 | + subgraph Storage["Storage"] |
| 45 | + DB[(Vault entries)] |
| 46 | + end |
| 47 | +
|
| 48 | + EVault -->|Resolve W3ID| Resolve |
| 49 | + EVault -->|List platforms| List |
| 50 | + Platform -->|Resolve / list| Resolve |
| 51 | + Wallet -->|Entropy for provisioning| Entropy |
| 52 | + Resolve --> DB |
| 53 | + List --> DB |
| 54 | + KeyBinding --> JWKS |
| 55 | +``` |
| 56 | + |
| 57 | +## Service discovery |
| 58 | + |
| 59 | +### GET /resolve?w3id=\<w3id\> |
| 60 | + |
| 61 | +Resolves a W3ID to the associated service details (eVault or platform endpoint). |
| 62 | + |
| 63 | +**Query parameter**: `w3id` (required) — the W3ID to resolve (e.g. `@user.w3id` or a service identifier). |
| 64 | + |
| 65 | +**Response** (200): |
| 66 | + |
| 67 | +```json |
| 68 | +{ |
| 69 | + "ename": "@user.w3id", |
| 70 | + "uri": "https://resolved-service.example.com", |
| 71 | + "evault": "evault-identifier", |
| 72 | + "originalUri": "https://...", |
| 73 | + "resolved": false |
| 74 | +} |
| 75 | +``` |
| 76 | + |
| 77 | +- **404**: No vault entry found for the given W3ID. |
| 78 | +- **400**: Missing `w3id` parameter. |
| 79 | + |
| 80 | +eVault and platforms use this to find where a user’s eVault or a platform’s API is hosted. See [eVault](/docs/Infrastructure/eVault) for how resolution is used in access control and webhook delivery. |
| 81 | + |
| 82 | +### GET /list |
| 83 | + |
| 84 | +Returns all registered vault entries (ename, uri, evault) with URIs resolved (e.g. for health checks or discovery). No authentication required. |
| 85 | + |
| 86 | +**Response** (200): Array of objects with `ename`, `uri`, `evault`, `originalUri`, `resolved`. |
| 87 | + |
| 88 | +## Entropy |
| 89 | + |
| 90 | +### GET /entropy |
| 91 | + |
| 92 | +Returns a signed JWT containing 20 alphanumeric characters of cryptographically secure entropy. Used by the eID Wallet and provisioning flows (e.g. when creating a new eVault). |
| 93 | + |
| 94 | +**Response** (200): |
| 95 | + |
| 96 | +```json |
| 97 | +{ |
| 98 | + "token": "eyJhbGciOiJFUzI1NiIs..." |
| 99 | +} |
| 100 | +``` |
| 101 | + |
| 102 | +**Token payload** (inside the JWT): |
| 103 | + |
| 104 | +- `entropy`: 20-character alphanumeric string |
| 105 | +- `iat`, `exp`: Issued at and expiration (valid for 1 hour) |
| 106 | + |
| 107 | +**Signing**: ES256. Verify using the public key from `GET /.well-known/jwks.json`. |
| 108 | + |
| 109 | +## JWK discovery |
| 110 | + |
| 111 | +### GET /.well-known/jwks.json |
| 112 | + |
| 113 | +Returns the JSON Web Key Set (JWK) used to sign entropy tokens and key binding certificates. Clients use this to verify JWTs issued by the Registry. |
| 114 | + |
| 115 | +**Response** (200): Standard JWK set (e.g. EC P-256, ES256, `use: "sig"`). |
| 116 | + |
| 117 | +## Key binding certificates (temporary) |
| 118 | + |
| 119 | +The Registry can issue **key binding certificates**: JWTs that bind a W3ID (eName) to a public key. eVault uses these when storing and serving public keys (e.g. via `/whois`). Platforms verify signatures using the public key from the certificate and validate the certificate using the Registry’s JWKS. |
| 120 | + |
| 121 | +**Flow**: |
| 122 | + |
| 123 | +1. eVault (or provisioning) stores a user’s public key and requests a key binding certificate from the Registry (internal/protected flow). |
| 124 | +2. The certificate is stored and later served (e.g. in eVault’s `/whois` response). |
| 125 | +3. Platforms fetch certificates and verify them with the Registry’s public key. |
| 126 | + |
| 127 | +**Certificate payload** (inside the JWT): `ename`, `publicKey`, `iat`, `exp` (e.g. 1 hour). |
| 128 | + |
| 129 | +:::warning |
| 130 | + |
| 131 | +Key binding attestation will be performed by a **Remote CA** in the future. The Registry currently issues these certificates as a shortcut. |
| 132 | + |
| 133 | +::: |
| 134 | + |
| 135 | +See [eVault — Key Binding Certificates](/docs/Infrastructure/eVault#key-binding-certificates) for how eVault uses them. |
| 136 | + |
| 137 | +## Data model (high level) |
| 138 | + |
| 139 | +The Registry stores **vault entries** used for resolution. Each entry conceptually has: |
| 140 | + |
| 141 | +- **ename**: W3ID (e.g. `@user.w3id` or service identifier) |
| 142 | +- **uri**: Service endpoint URL (resolved at runtime, e.g. with health checks) |
| 143 | +- **evault**: eVault identifier for routing |
| 144 | + |
| 145 | +Entropy and key binding tokens are JWTs signed with ES256; structure is described in the sections above. Registration and management of vault entries are internal and not documented as part of the public API. |
| 146 | + |
| 147 | +## Integration |
| 148 | + |
| 149 | +- **eVault**: Calls Registry to resolve W3IDs (access control, webhook targets), and uses key binding certificates for `/whois`. See [eVault](/docs/Infrastructure/eVault) and [Authentication](/docs/W3DS%20Protocol/Authentication). |
| 150 | +- **[eID Wallet](/docs/Infrastructure/eID-Wallet)**: Uses `/entropy` during provisioning. Verifies JWTs using `/.well-known/jwks.json`. |
| 151 | +- **Platforms**: Use `/resolve` and `/list` for discovery; see [Post Platform Guide](/docs/Post%20Platform%20Guide/getting-started). Verify tokens with the Registry’s JWKS. |
| 152 | + |
| 153 | +## References |
| 154 | + |
| 155 | +- [eVault](/docs/Infrastructure/eVault) — Resolution, key binding, and webhook delivery |
| 156 | +- [eID Wallet](/docs/Infrastructure/eID-Wallet) — Provisioning and entropy |
| 157 | +- [W3ID](/docs/W3DS%20Basics/W3ID) — Identifiers and eName resolution |
| 158 | +- [Links](/docs/W3DS%20Basics/Links) — Production Registry URL |
| 159 | +- [Authentication](/docs/W3DS%20Protocol/Authentication) — How platforms authenticate users |
| 160 | +- [Signing](/docs/W3DS%20Protocol/Signing) — Signature verification using eVault keys |
0 commit comments