Kong · Schema

IpRestrictionPluginConfig

API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source

Properties

Name Type Description
config object
consumer object If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to acti
consumer_group object If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset
name object
protocols array A set of strings representing protocols.
route object If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.
service object If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.
View JSON Schema on GitHub

JSON Schema

kong-iprestrictionpluginconfig-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/IpRestrictionPluginConfig",
  "title": "IpRestrictionPluginConfig",
  "x-speakeasy-entity": "PluginIpRestriction",
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "allow": {
          "description": "List of IPs or CIDR ranges to allow. One of `config.allow` or `config.deny` must be specified.",
          "type": "array",
          "items": {
            "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.",
            "type": "string"
          }
        },
        "deny": {
          "description": "List of IPs or CIDR ranges to deny. One of `config.allow` or `config.deny` must be specified.",
          "type": "array",
          "items": {
            "description": "A string representing an IP address or CIDR block, such as 192.168.1.1 or 192.168.0.0/16.",
            "type": "string"
          }
        },
        "message": {
          "description": "The message to send as a response body to rejected requests.",
          "type": "string"
        },
        "status": {
          "description": "The HTTP status of the requests that will be rejected by the plugin.",
          "type": "number"
        }
      }
    },
    "consumer": {
      "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        }
      }
    },
    "consumer_group": {
      "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        }
      }
    },
    "name": {
      "const": "ip-restriction"
    },
    "protocols": {
      "description": "A set of strings representing protocols.",
      "type": "array",
      "items": {
        "description": "A string representing a protocol, such as HTTP or HTTPS.",
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https",
          "tcp",
          "tls",
          "tls_passthrough",
          "udp",
          "ws",
          "wss"
        ],
        "type": "string"
      },
      "format": "set",
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https",
        "tcp",
        "tls"
      ]
    },
    "route": {
      "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        }
      }
    },
    "service": {
      "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        }
      }
    }
  }
}