{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.krakend.io/schema/v2.2/auth/api-keys.json",
  "title": "API-key Authentication",
  "description": "Enterprise only. Enables a Role-Based Access Control (RBAC) mechanism by reading the `Authorization` header of incoming requests.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
  "type": "object",
  "required": [ "keys" ],
  "properties": {
    "identifier": {
      "$id": "#auth/api-keys/identifier",
      "title": "Identifier",
      "description": "The header name or the query string name that contains the API key. Defaults to `key` when using the `query_string` strategy and to Authorization when using `header`.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
      "examples": [ "Authorization" ],
      "type": "string"
    },
    "keys": {
      "$id": "#auth/api-keys/keys",
      "title": "API Keys",
      "description": "A list of objects defining each API Key.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "title": "API Key",
            "description": "The secret key used by the client to access the resources. Don't have a key? Execute in a terminal `uuidgen` to generate a random one.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
            "type": "string"
          },
          "roles": {
            "title": "Roles",
            "description": "All the roles this user has. See roles as all the identifying labels that belong to this client.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "patternProperties": {
          "^[@$_#]": {}
        },
        "additionalProperties": false
      }
    },
    "strategy": {
      "$id": "#auth/api-keys/strategy",
      "title": "Strategy",
      "description": "One of header or query_string. Specifies where to expect the user API key, whether inside a header or as part of the query string. Defaults to header.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/",
      "enum": [ "header", "query_string" ]
    }
  },
  "patternProperties": {
    "^[@$_#]": {}
  },
  "additionalProperties": false
}
