Create Validator

POST /networks/:networkId/validators

Create a new Canton Validator.

Required Permissions

Name
Conditions

Networks:CantonValidators:Create

Always Required

Request body

Sample request body for Shared

{
  "kind": "Shared",
  "name": "My shared validator"
}

Sample request body for Custom

Auth0

{
  "kind": "Custom",
  "name": "My custom validator with Auth0",
  "validator": {
    "url": "https://validator.testnet.mydomain.com/",
    "oauth2": {
      "domain": "https://<xxxxxx>.us.auth0.com",
      "clientId": "xxxxxx",
      "clientSecret": "xxxxxxx",
      "audience": "https://canton.network.global",
    }
  },
  "ledger": {
    "url": "https://validator.testnet.mydomain.com/",
    "oauth2": {
      "domain": "https://<xxxxxx>.us.auth0.com",
      "tokenPath": "xxxxxx/xxxxx",
      "clientId": "xxxxx",
      "clientSecret": "xxxxxxx",
      "audience": "https://canton.network.global"
    }
  }
}

Okta

{
  "kind": "Custom",
  "name": "My custom validator with Okta",
  "validator": {
    "url": "https://validator.testnet.mydomain.com/",
    "oauth2": {
      "domain": "https://<xxxxxx>.okta.com",
      "tokenPath": "oauth2/<xxxxxx>/v1/token",
      "clientId": "xxxxxx",
      "clientSecret": "xxxxxxx",
      "audience": "https://validator.testnet.mydomain.com/",
    }
  },
  "ledger": {
    "url": "https://validator.testnet.mydomain.com/",
    "oauth2": {
      "domain": "https://<xxxxxx>.okta.com",
      "tokenPath": "oauth2/<xxxxxx>/v1/token",
      "clientId": "xxxxx",
      "clientSecret": "xxxxxxx",
      "audience": "https://validator.testnet.mydomain.com/"
    }
  }
}

Keycloak

{
  "kind": "Custom",
  "name": "My custom validator with Keycloak",
  "validator": {
    "url": "https://validator.testnet.mydomain.com/",
    "oauth2": {
      "domain": "https://my-own-server.running-keycloak.com",
      "tokenPath": "/auth/realms/<xxxxx>/protocol/openid-connect/token",
      "clientId": "xxxxxx",
      "clientSecret": "xxxxxxx",
      "audience": "https://validator.testnet.mydomain.com/"
    }
  },
  "ledger": {
    "url": "https://validator.testnet.mydomain.com/",
    "oauth2": {
      "domain": "https://my-own-server.running-keycloak.com",
      "tokenPath": "/auth/realms/<xxxxx>/protocol/openid-connect/token",
      "clientId": "xxxxx",
      "clientSecret": "xxxxxxx",
      "audience": "https://validator.testnet.mydomain.com/"
    }
  }
}

Response

Response example

{
  "id": "cv-xxxx",
  "kind": "Custom",
  "name": "My custom validator",
  "dateCreated": "2023-04-14T20:41:28.715Z"
}

Last updated