{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/worker-manager/v1/register-worker-response.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Response body to `registerWorker`.",
  "properties": {
    "credentials": {
      "additionalProperties": false,
      "description": "The credentials the worker\nwill need to perform its work.  Specifically, credentials with scopes\n* `assume:worker-pool:<workerPoolId>`\n* `assume:worker-id:<workerGroup>/<workerId>`\n* `queue:worker-id:<workerGroup>/<workerId>`\n* `secrets:get:worker-pool:<workerPoolId>`\n* `queue:claim-work:<workerPoolId>`\n* `worker-manager:remove-worker:<workerPoolId>/<workerGroup>/<workerId>`\n",
      "properties": {
        "accessToken": {
          "type": "string"
        },
        "certificate": {
          "description": "Note that a certificate may not be provided, if the credentials are not temporary.\n",
          "type": "string"
        },
        "clientId": {
          "type": "string"
        }
      },
      "required": [
        "accessToken",
        "clientId"
      ],
      "title": "Credentials",
      "type": "object"
    },
    "expires": {
      "description": "Time at which the included credentials will expire.  Workers must either\nre-register (for static workers) or terminate (for dynamically\nprovisioned workers) before this time.\n",
      "format": "date-time",
      "title": "Expires",
      "type": "string"
    },
    "secret": {
      "description": "A secret value generated by worker-manager that can be used in the call to `reregisterWorker`.\nFor more information, refer to https://docs.taskcluster.net/docs/reference/core/worker-manager#reregistration.\n",
      "pattern": "^[a-zA-Z0-9_-]{44}$",
      "title": "Secret",
      "type": "string"
    },
    "workerConfig": {
      "additionalProperties": true,
      "description": "This value is supplied unchanged to the worker from the worker-pool configuration.\nThe expectation is that the worker will merge this information with configuration from other sources,\nand this is precisely what [worker-runner](https://docs.taskcluster.net/docs/reference/workers/worker-runner) does.\nThis property must not be used for secret configuration, as it is visible both in the worker pool configuration and in the worker instance's metadata.\nInstead, put secret configuration in the [secrets service](https://docs.taskcluster.net/docs/reference/workers/worker-runner).\n",
      "title": "Worker Config",
      "type": "object"
    }
  },
  "required": [
    "expires",
    "credentials",
    "workerConfig",
    "secret"
  ],
  "title": "Register Worker Response",
  "type": "object"
}