Host your DID document

Your DID document is the public part of your identity on the Notabene network. It holds your public keys and tells other institutions where to deliver Travel Rule messages to you. In production you publish it on your own domain, at the address your DID points to, while in sandbox Notabene publishes it and you have nothing to do.

Host a copy
Redirect
Steps
Host a copy
Redirect

Optional

← → the step before and after · Esc all steps
Step 1
1Get your DID document
You, from the API

Notabene creates your DID document together with your account. Once your account is active, 1. Get your DID document shows how to read it.

← → the step before and after · Esc all steps
Step 2
2Find where it must be hosted
From your DID

Your DID tells you where the document must be hosted, and 2. Find where it must be hosted gives the rule with examples.

← → the step before and after · Esc all steps
Host a copy · Step 3
3Publish the file
You, on your web server

Save the document as did.json at that address, served over HTTPS as JSON. See 3. Publish it.

← → the step before and after · Esc all steps
Host a copy · Optional
Add your own key
You, for end-to-end encryption

To receive Travel Rule data that only you can decrypt, add your own public key to the copy, next to Notabene’s keys. See 3. Publish it.

← → the step before and after · Esc all steps
Redirect · Step 3
3Redirect to Notabene
You, on your web server

Redirect that address to Notabene’s copy, which stays up to date by itself. See 3. Publish it.

← → the step before and after · Esc all steps
Step 4
4Check that it is online
You

Open the address in a browser or with curl and check that it returns your DID document, as in 4. Check that it is online.

← → the step before and after · Esc all steps
  1. Get your DID document (You, from the API). Notabene creates your DID document together with your account. Once your account is active, 1. Get your DID document shows how to read it.
  2. Find where it must be hosted (https://{domain}/{jurisdiction}/did.json, From your DID). Your DID tells you where the document must be hosted, and 2. Find where it must be hosted gives the rule with examples.
  3. Host a copy: Publish the file (You, on your web server). Save the document as did.json at that address, served over HTTPS as JSON. See 3. Publish it.
  4. Host a copy: Add your own key (optional, You, for end-to-end encryption). To receive Travel Rule data that only you can decrypt, add your own public key to the copy, next to Notabene’s keys. See 3. Publish it.
  5. Redirect: Redirect to Notabene (You, on your web server). Redirect that address to Notabene’s copy, which stays up to date by itself. See 3. Publish it.
  6. Check that it is online (You). Open the address in a browser or with curl and check that it returns your DID document, as in 4. Check that it is online.

1. Get your DID document

Notabene creates your DID document together with your account. Once your account is active (step 4 of Create your account), read it through the API with an access token, as described in Authentication.

API reference
curl https://sandbox.notabene.id/api/v1/identity \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'const response = await fetch('https://sandbox.notabene.id/api/v1/identity', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer YOUR_ACCESS_TOKEN',
  },
});
const answer = response.status === 204 ? null : await response.json();import requests

response = requests.get(
    'https://sandbox.notabene.id/api/v1/identity',
    headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
)
answer = None if response.status_code == 204 else response.json()
Response200
{
  "did": "did:web:example.com:pt",
  "document": {
    "@context": [
      "https://www.w3.org/ns/did/v1",
      "https://w3id.org/security/suites/jws-2020/v1"
    ],
    "id": "did:web:example.com:pt",
    "verificationMethod": [
      {
        "id": "did:web:example.com:pt#nb-signing",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "Qm3P8a5DdOU1x9xKq0GZ4vFgk2Yc7Wbz2rNnT0sJmVw"
        }
      },
      {
        "id": "did:web:example.com:pt#nb-key-agreement",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "X25519",
          "x": "hS9pQmV4c2tXbk1hY0w2ZlJ0eUJ3c0ZqNXpQa0h1dE0"
        }
      },
      {
        "id": "did:web:example.com:pt#nb-pii",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "EC",
          "crv": "P-256",
          "x": "QPd12KIDz9nFplcr_zn0aUHZlS5xeAxF1yBhevpPixU",
          "y": "eyqRi-hjnxxItYmZjWiHKvmJF3yMvCcz0T3lvVhZLXU"
        }
      }
    ],
    "authentication": [
      "did:web:example.com:pt#nb-signing"
    ],
    "assertionMethod": [
      "did:web:example.com:pt#nb-signing"
    ],
    "keyAgreement": [
      "did:web:example.com:pt#nb-key-agreement",
      "did:web:example.com:pt#nb-pii"
    ],
    "service": [
      {
        "id": "did:web:example.com:pt#didcomm",
        "type": "DIDCommMessaging",
        "serviceEndpoint": {
          "uri": "https://eu-a.notabene.id/didcomm",
          "accept": [
            "didcomm/v2"
          ],
          "routingKeys": []
        }
      }
    ]
  }
}
curl https://sandbox.notabene.id/api/v1/identity \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
const response = await fetch('https://sandbox.notabene.id/api/v1/identity', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer YOUR_ACCESS_TOKEN',
  },
});
const answer = response.status === 204 ? null : await response.json();
import requests

response = requests.get(
    'https://sandbox.notabene.id/api/v1/identity',
    headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
)
answer = None if response.status_code == 204 else response.json()
{
  "did": "did:web:example.com:pt",
  "document": {
    "@context": [
      "https://www.w3.org/ns/did/v1",
      "https://w3id.org/security/suites/jws-2020/v1"
    ],
    "id": "did:web:example.com:pt",
    "verificationMethod": [
      {
        "id": "did:web:example.com:pt#nb-signing",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "Ed25519",
          "x": "Qm3P8a5DdOU1x9xKq0GZ4vFgk2Yc7Wbz2rNnT0sJmVw"
        }
      },
      {
        "id": "did:web:example.com:pt#nb-key-agreement",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "OKP",
          "crv": "X25519",
          "x": "hS9pQmV4c2tXbk1hY0w2ZlJ0eUJ3c0ZqNXpQa0h1dE0"
        }
      },
      {
        "id": "did:web:example.com:pt#nb-pii",
        "type": "JsonWebKey2020",
        "controller": "did:web:example.com:pt",
        "publicKeyJwk": {
          "kty": "EC",
          "crv": "P-256",
          "x": "QPd12KIDz9nFplcr_zn0aUHZlS5xeAxF1yBhevpPixU",
          "y": "eyqRi-hjnxxItYmZjWiHKvmJF3yMvCcz0T3lvVhZLXU"
        }
      }
    ],
    "authentication": [
      "did:web:example.com:pt#nb-signing"
    ],
    "assertionMethod": [
      "did:web:example.com:pt#nb-signing"
    ],
    "keyAgreement": [
      "did:web:example.com:pt#nb-key-agreement",
      "did:web:example.com:pt#nb-pii"
    ],
    "service": [
      {
        "id": "did:web:example.com:pt#didcomm",
        "type": "DIDCommMessaging",
        "serviceEndpoint": {
          "uri": "https://eu-a.notabene.id/didcomm",
          "accept": [
            "didcomm/v2"
          ],
          "routingKeys": []
        }
      }
    ]
  }
}

Publish only the document object, because the response also holds your DID.

2. Find where it must be hosted

Hosting the document on your own domain is what lets counterparties trust the keys in it. Your DID names your domain, so a counterparty fetches the document from that domain over HTTPS, and only whoever controls the domain can publish a file there. Counterparties therefore know the keys belong to the institution behind the domain, and that a message signed with them comes from you. When the document does not answer at that address, they cannot check your signatures and do not accept your messages.

The address comes from your DID: each part after the domain becomes a folder, then did.json. It must be served over HTTPS on exactly that host, and example.com and www.example.com count as two different addresses.

DID

did:web:example.com:pt

Address of its document

https://example.com/pt/did.json

DID

did:web:example.com:payments:pt

Address of its document

https://example.com/payments/pt/did.json

DIDAddress of its document
did:web:example.com:pthttps://example.com/pt/did.json
did:web:example.com:payments:pthttps://example.com/payments/pt/did.json

3. Publish it

Either host a copy of the document at that address, or redirect the address to Notabene’s copy. A redirect is also set up on your domain, so either way your domain vouches for the document.

Host a copy

Save the document as did.json at that address, served over HTTPS as JSON. Publish it again whenever it changes. Only a copy can hold your own key.

Redirect

Redirect that address to Notabene’s copy, which is your base URL followed by /did/, your full DID and /did.json, as in /did/did:web:example.com:pt/did.json. The document then stays up to date without any action from you, but it cannot hold your own key.

OptionWhat you do
Host a copySave the document as did.json at that address, served over HTTPS as JSON. Publish it again whenever it changes. Only a copy can hold your own key.
RedirectRedirect that address to Notabene’s copy, which is your base URL followed by /did/, your full DID and /did.json, as in /did/did:web:example.com:pt/did.json. The document then stays up to date without any action from you, but it cannot hold your own key.

To receive personal data that only you can decrypt, add your own public key to your copy next to Notabene’s keys, as described in Encryption. Leave the keys already in it in place, including the PII key whose id ends in #nb-pii, because Notabene uses them for more than personal data. Give your own key the id #pii, as a P-256 key listed under keyAgreement.

4. Check that it is online

Open the address in a browser or with curl, and check that it returns your DID document with your DID as its id.

cURL
curl -sL https://example.com/pt/did.json
curl -sL https://example.com/pt/did.json

Most often the problem is a redirect from example.com to www.example.com, a login page or firewall in front of the file, or an HTML error page instead of JSON. If the document stops answering later, the dashboard Inbox shows the warning “Your DID doc is unreachable”.

What the document contains

Notabene generates the document for you, as in the response of step 1. Publish it as it is, unless you add your own key for end-to-end encryption.

PartWhat it is
idYour DID. It must match the address the document is served from.
verificationMethodYour public keys. The private keys stay with your node.
authentication, assertionMethodThe key that signs your messages.
keyAgreementThe keys counterparty institutions use to encrypt data for you.
serviceWhere counterparty institutions deliver Travel Rule messages to you: your node’s DIDComm endpoint.
PartWhat it is
idYour DID. It must match the address the document is served from.
verificationMethodYour public keys. The private keys stay with your node.
authentication, assertionMethodThe key that signs your messages.
keyAgreementThe keys counterparty institutions use to encrypt data for you.
serviceWhere counterparty institutions deliver Travel Rule messages to you: your node’s DIDComm endpoint.

To learn more about DID documents, see the W3C DID specification, and for how a DID is read from its domain, the did:web method specification.

In sandbox

Notabene publishes your sandbox DID document, so you do not need to do anything. To test end-to-end encryption in sandbox, download the document from the address your DID points to and add your own key to it, as in 3. Publish it. Then send the edited document to your Notabene Account Manager or [email protected], and Notabene publishes it in place of the one it generated.


Did this page help you?