Files
ziti/tunnel/entities/intercept.v1.json
T
Paul Lorenz 39626472e3 Support for intercept.v1 config type (#618)
* Support for intercept.v1 config type
2021-04-05 11:52:12 -04:00

149 lines
4.4 KiB
JSON

{
"$defs": {
"address": {
"oneOf": [
{
"$ref": "#/$defs/ipAddress"
},
{
"$ref": "#/$defs/hostname"
},
{
"$ref": "#/$defs/cidr"
}
]
},
"cidr": {
"oneOf": [
{
"pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(3[0-2]|[1-2][0-9]|[0-9]))$"
},
{
"pattern": "^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\\/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))$"
}
],
"type": "string"
},
"hostname": {
"format": "hostname",
"not": {
"$ref": "#/$defs/ipAddressFormat"
},
"type": "string"
},
"inhabitedSet": {
"minItems": 1,
"type": "array",
"uniqueItems": true
},
"ipAddress": {
"$ref": "#/$defs/ipAddressFormat",
"type": "string"
},
"ipAddressFormat": {
"oneOf": [
{
"format": "ipv4"
},
{
"format": "ipv6"
}
]
},
"portNumber": {
"maximum": 65535,
"minimum": 0,
"type": "integer"
},
"portRange": {
"additionalProperties": false,
"properties": {
"high": {
"$ref": "#/$defs/portNumber"
},
"low": {
"$ref": "#/$defs/portNumber"
}
},
"type": "object"
},
"protocolName": {
"enum": [
"tcp",
"udp",
"sctp"
],
"type": "string"
},
"timeoutSeconds": {
"maximum": 2147483647,
"minimum": 0,
"type": "integer"
}
},
"$id": "http://edge.openziti.org/schemas/intercept.v1.config.json",
"additionalProperties": false,
"properties": {
"addresses": {
"allOf": [
{
"$ref": "#/$defs/inhabitedSet"
},
{
"items": {
"$ref": "#/$defs/address"
}
}
]
},
"dialOptions": {
"additionalProperties": false,
"properties": {
"connectTimeoutSeconds": {
"$ref": "#/$defs/timeoutSeconds",
"description": "defaults to 5 seconds if no dialOptions are defined. defaults to 15 if dialOptions are defined but connectTimeoutSeconds is not specified."
},
"identity": {
"description": "Dial a terminator with the specified identity. '$intercepted_protocol', '$intercepted_ip', '$intercepted_port are resolved to the corresponding value of the intercepted address.",
"type": "string"
}
},
"type": "object"
},
"portRanges": {
"allOf": [
{
"$ref": "#/$defs/inhabitedSet"
},
{
"items": {
"$ref": "#/$defs/portRange"
}
}
]
},
"protocols": {
"allOf": [
{
"$ref": "#/$defs/inhabitedSet"
},
{
"items": {
"$ref": "#/$defs/protocolName"
}
}
]
},
"sourceIp": {
"description": "The source IP to spoof when the connection is egressed from the hosting tunneler. '$tunneler_id.name' resolves to the name of the client tunneler's identity. '$tunneler_id.tag[tagName]' resolves to the value of the 'tagName' tag on the client tunneler's identity.",
"type": "string"
}
},
"required": [
"protocols",
"addresses",
"portRanges"
],
"type": "object"
}