{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/auth/v1/authenticate-hawk-request.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Request to authenticate a hawk request.\n",
  "properties": {
    "authorization": {
      "description": "Authorization header, **must** only be specified if request being\nauthenticated has a `Authorization` header.\n",
      "type": "string"
    },
    "host": {
      "description": "Host for which the request came in, this is typically the `Host` header\nexcluding the port if any.\n",
      "format": "hostname",
      "title": "Hostname or IPv4",
      "type": "string"
    },
    "method": {
      "description": "HTTP method of the request being authenticated.\n",
      "enum": [
        "get",
        "post",
        "put",
        "head",
        "delete",
        "options",
        "trace",
        "copy",
        "lock",
        "mkcol",
        "move",
        "purge",
        "propfind",
        "proppatch",
        "unlock",
        "report",
        "mkactivity",
        "checkout",
        "merge",
        "m-search",
        "notify",
        "subscribe",
        "unsubscribe",
        "patch",
        "search",
        "connect"
      ],
      "type": "string"
    },
    "port": {
      "description": "Port on which the request came in, this is typically `80` or `443`.\nIf you are running behind a reverse proxy look for the `x-forwarded-port`\nheader.\n",
      "maximum": 65535,
      "minimum": 0,
      "type": "integer"
    },
    "resource": {
      "description": "Resource the request operates on including querystring. This is the\nstring that follows the HTTP method.\n**Note,** order of querystring elements is important.\n",
      "type": "string"
    },
    "sourceIp": {
      "description": "Source IP of the authentication request or request that requires\nauthentication. This is only used for audit logging.\n",
      "oneOf": [
        {
          "format": "ipv6"
        },
        {
          "format": "ipv4"
        }
      ],
      "title": "Source IP",
      "type": "string"
    }
  },
  "required": [
    "method",
    "resource",
    "host",
    "port"
  ],
  "title": "Hawk Signature Authentication Request",
  "type": "object"
}