{
  "name": "Authorize",
  "plane": "control",
  "terraformEligible": false,
  "protocol": {
    "kind": "rest",
    "method": "POST",
    "path": "/auth/authorize",
    "query": [],
    "headers": [
      "authorization"
    ],
    "body": true
  },
  "requestBody": "json",
  "responseBody": "json",
  "requestSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "definitions": {
      "CloudRole": {
        "description": "Directory CloudRole. Wire spelling matches JWT `cloud_role` (`readonly`, not `read_only`).",
        "enum": [
          "owner",
          "admin",
          "developer",
          "billing",
          "readonly"
        ],
        "type": "string"
      },
      "DirectoryKind": {
        "description": "JWT `directory_kind` on human Authorize / directory wire (`cloud` only).",
        "enum": [
          "cloud"
        ],
        "type": "string"
      },
      "PrincipalKind": {
        "description": "Authorize / JWT principal kind (`human` | `app_user` | `workload`).",
        "enum": [
          "human",
          "app_user",
          "workload"
        ],
        "type": "string"
      }
    },
    "properties": {
      "action": {
        "type": "string"
      },
      "directoryKind": {
        "anyOf": [
          {
            "$ref": "#/definitions/DirectoryKind"
          },
          {
            "type": "null"
          }
        ],
        "default": null
      },
      "principalId": {
        "type": "string"
      },
      "principalKind": {
        "$ref": "#/definitions/PrincipalKind"
      },
      "resourceArn": {
        "type": "string"
      },
      "role": {
        "anyOf": [
          {
            "$ref": "#/definitions/CloudRole"
          },
          {
            "type": "null"
          }
        ],
        "default": null
      },
      "tenantId": {
        "type": "string"
      }
    },
    "required": [
      "action",
      "principalId",
      "principalKind",
      "resourceArn",
      "tenantId"
    ],
    "title": "AuthorizeRequest",
    "type": "object"
  },
  "responseSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "properties": {
      "decision": {
        "type": "string"
      }
    },
    "required": [
      "decision"
    ],
    "title": "AuthorizeResponse",
    "type": "object"
  }
}
