{
  "$id": "https://opendatafabric.org/schemas/auth/v1alpha1/PrincipalRef",
  "$schema": "https://opendatafabric.org/schemas/resources/v1alpha1/meta/ResourceRef",
  "description": "Reference to an identity that can act as a principal: `User`, `ServiceAccount`, or `Node`. Short form requires a type prefix, e.g. `ServiceAccount:acme/ingest-prod`.",
  "format": "struct-or-string",
  "oneOf": [
    {
      "type": "string"
    },
    {
      "type": "object",
      "required": [],
      "properties": {
        "type": {
          "type": "string",
          "format": "type-ref",
          "description": "Short type name or full type URI of the principal."
        },
        "account": {
          "$ref": "https://opendatafabric.org/schemas/auth/v1alpha1/ResourceOwnerRef",
          "description": "Reference to an account that owns the service account.",
          "unevaluatedProperties": false
        },
        "id": {
          "type": "string",
          "format": "resource-id",
          "description": "ID of the principal resource."
        },
        "did": {
          "type": "string",
          "format": "did",
          "description": "DID of the principal."
        },
        "name": {
          "type": "string",
          "format": "resource-name",
          "description": "Name of the principal resource."
        }
      }
    }
  ]
}
