diff --git a/build b/build index fc9afb48..4b6f9c39 100644 --- a/build +++ b/build @@ -1 +1 @@ -59 \ No newline at end of file +64 \ No newline at end of file diff --git a/src/framework/ConfigurationValidator.cpp b/src/framework/ConfigurationValidator.cpp index db7cc3cd..46b0f066 100644 --- a/src/framework/ConfigurationValidator.cpp +++ b/src/framework/ConfigurationValidator.cpp @@ -37,6 +37,10 @@ static std::string DefaultUCentralSchema = R"foo( "uuid": { "type": "integer" }, + "public_ip_lookup": { + "type": "string", + "format": "uc-fqdn" + }, "unit": { "$ref": "#/$defs/unit" }, @@ -634,26 +638,6 @@ static std::string DefaultUCentralSchema = R"foo( "type": "string", "format": "uc-timeout", "default": "6h" - }, - "relay-server": { - "type": "string", - "format": "ipv4", - "example": "192.168.2.1" - }, - "circuit-id-format": { - "type": "string", - "example": [ - "\\{Interface\\}:\\{VLAN-Id\\}:\\{SSID\\}:\\{Model\\}:\\{Name\\}:\\{AP-MAC\\}:\\{Location\\}", - "\\{AP-MAC\\};\\{SSID\\};\\{Crypto\\}", - "\\{Name\\} \\{ESSID\\}" - ] - }, - "remote-id-format": { - "type": "string", - "example": [ - "\\{Client-MAC-hex\\} \\{SSID\\}", - "\\{AP-MAC-hex\\} \\{SSID\\}" - ] } } }, @@ -1232,6 +1216,32 @@ static std::string DefaultUCentralSchema = R"foo( "secret" ] }, + "secondary": { + "type": "object", + "properties": { + "host": { + "type": "string", + "format": "uc-host", + "examples": [ + "192.168.1.10" + ] + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1024, + "examples": [ + 1812 + ] + }, + "secret": { + "type": "string", + "examples": [ + "secret" + ] + } + } + }, "request-attribute": { "type": "array", "items": { @@ -1309,6 +1319,25 @@ static std::string DefaultUCentralSchema = R"foo( "value": "Example Operator" } ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer", + "maximum": 255, + "minimum": 1 + }, + "hex-value": { + "type": "string" + } + }, + "examples": [ + { + "id": 32, + "value": "0a0b0c0d" + } + ] } ] } @@ -1658,129 +1687,370 @@ static std::string DefaultUCentralSchema = R"foo( } } }, - "interface.ssid": { + "service.captive.click": { "type": "object", "properties": { - "purpose": { + "auth-mode": { "type": "string", - "enum": [ - "user-defined", - "onboarding-ap", - "onboarding-sta" - ], - "default": "user-defined" + "const": "click-to-continue" + } + } + }, + "service.captive.radius": { + "type": "object", + "properties": { + "auth-mode": { + "type": "string", + "const": "radius" }, - "name": { + "auth-server": { "type": "string", - "maxLength": 32, - "minLength": 1 + "format": "uc-host", + "examples": [ + "192.168.1.10" + ] }, - "wifi-bands": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "2G", - "5G", - "5G-lower", - "5G-upper", - "6G" - ] - } + "auth-port": { + "type": "integer", + "maximum": 65535, + "minimum": 1024, + "default": 1812 }, - "bss-mode": { + "auth-secret": { "type": "string", - "enum": [ - "ap", - "sta", - "mesh", - "wds-ap", - "wds-sta", - "wds-repeater" - ], - "default": "ap" + "examples": [ + "secret" + ] }, - "bssid": { + "acct-server": { "type": "string", - "format": "uc-mac" - }, - "hidden-ssid": { - "type": "boolean" - }, - "isolate-clients": { - "type": "boolean" - }, - "power-save": { - "type": "boolean" + "format": "uc-host", + "examples": [ + "192.168.1.10" + ] }, - "rts-threshold": { + "acct-port": { "type": "integer", "maximum": 65535, - "minimum": 1 + "minimum": 1024, + "default": 1812 }, - "broadcast-time": { - "type": "boolean" + "acct-secret": { + "type": "string", + "examples": [ + "secret" + ] }, - "unicast-conversion": { - "type": "boolean", - "default": true + "acct-interval": { + "type": "integer", + "default": 600 + } + } + }, + "service.captive.credentials": { + "type": "object", + "properties": { + "auth-mode": { + "type": "string", + "const": "credentials" }, - "services": { + "credentials": { "type": "array", "items": { - "type": "string", - "examples": [ - "wifi-steering" - ] + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } } + } + } + }, + "service.captive.uam": { + "type": "object", + "properties": { + "auth-mode": { + "type": "string", + "const": "uam" }, - "dtim-period": { + "uam-port": { "type": "integer", - "default": 2, - "maximum": 255, - "minimum": 1 + "maximum": 65535, + "minimum": 1024, + "default": 3990 }, - "maximum-clients": { - "type": "integer", - "example": 64 + "uam-secret": { + "type": "string" }, - "proxy-arp": { - "type": "boolean", - "default": true + "uam-server": { + "type": "string" }, - "disassoc-low-ack": { - "decription": "Disassociate stations based on excessive transmission failures or other indications of connection loss.", - "type": "boolean", - "default": false + "nasid": { + "type": "string" }, - "vendor-elements": { - "decription": "This option allows embedding custom vendor specific IEs inside the beacons of a BSS in AP mode.", + "nasmac": { "type": "string" }, - "fils-discovery-interval": { + "auth-server": { + "type": "string", + "format": "uc-host", + "examples": [ + "192.168.1.10" + ] + }, + "auth-port": { "type": "integer", - "default": 20, - "maximum": 20 + "maximum": 65535, + "minimum": 1024, + "default": 1812 }, - "encryption": { - "$ref": "#/$defs/interface.ssid.encryption" + "auth-secret": { + "type": "string", + "examples": [ + "secret" + ] }, - "multi-psk": { - "type": "array", - "items": { - "$ref": "#/$defs/interface.ssid.multi-psk" - } + "acct-server": { + "type": "string", + "format": "uc-host", + "examples": [ + "192.168.1.10" + ] }, - "rrm": { - "$ref": "#/$defs/interface.ssid.rrm" + "acct-port": { + "type": "integer", + "maximum": 65535, + "minimum": 1024, + "default": 1812 }, - "rate-limit": { - "$ref": "#/$defs/interface.ssid.rate-limit" + "acct-secret": { + "type": "string", + "examples": [ + "secret" + ] }, - "roaming": { - "$ref": "#/$defs/interface.ssid.roaming" + "acct-interval": { + "type": "integer", + "default": 600 }, - "radius": { + "ssid": { + "type": "string" + }, + "mac-format": { + "type": "string", + "enum": [ + "aabbccddeeff", + "aa-bb-cc-dd-ee-ff", + "aa:bb:cc:dd:ee:ff", + "AABBCCDDEEFF", + "AA:BB:CC:DD:EE:FF", + "AA-BB-CC-DD-EE-FF" + ] + }, + "final-redirect-url": { + "type": "string", + "enum": [ + "default", + "uam" + ] + }, + "mac-auth": { + "type": "boolean", + "default": "default" + }, + "radius-gw-proxy": { + "type": "boolean", + "default": false + } + } + }, + "service.captive": { + "allOf": [ + { + "oneOf": [ + { + "$ref": "#/$defs/service.captive.click" + }, + { + "$ref": "#/$defs/service.captive.radius" + }, + { + "$ref": "#/$defs/service.captive.credentials" + }, + { + "$ref": "#/$defs/service.captive.uam" + } + ] + }, + { + "type": "object", + "properties": { + "walled-garden-fqdn": { + "type": "array", + "items": { + "type": "string" + } + }, + "walled-garden-ipaddr": { + "type": "array", + "items": { + "type": "string", + "format": "uc-ip" + } + }, + "web-root": { + "type": "string", + "format": "uc-base64" + }, + "idle-timeout": { + "type": "integer", + "default": 600 + }, + "session-timeout": { + "type": "integer" + } + } + } + ] + }, + "interface.ssid": { + "type": "object", + "properties": { + "purpose": { + "type": "string", + "enum": [ + "user-defined", + "onboarding-ap", + "onboarding-sta" + ], + "default": "user-defined" + }, + "name": { + "type": "string", + "maxLength": 32, + "minLength": 1 + }, + "wifi-bands": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "2G", + "5G", + "5G-lower", + "5G-upper", + "6G" + ] + } + }, + "bss-mode": { + "type": "string", + "enum": [ + "ap", + "sta", + "mesh", + "wds-ap", + "wds-sta", + "wds-repeater" + ], + "default": "ap" + }, + "bssid": { + "type": "string", + "format": "uc-mac" + }, + "hidden-ssid": { + "type": "boolean" + }, + "isolate-clients": { + "type": "boolean" + }, + "strict-forwarding": { + "type": "boolean", + "default": false + }, + "power-save": { + "type": "boolean" + }, + "rts-threshold": { + "type": "integer", + "maximum": 65535, + "minimum": 1 + }, + "broadcast-time": { + "type": "boolean" + }, + "unicast-conversion": { + "type": "boolean", + "default": true + }, + "services": { + "type": "array", + "items": { + "type": "string", + "examples": [ + "wifi-steering" + ] + } + }, + "dtim-period": { + "type": "integer", + "default": 2, + "maximum": 255, + "minimum": 1 + }, + "maximum-clients": { + "type": "integer", + "example": 64 + }, + "proxy-arp": { + "type": "boolean", + "default": true + }, + "disassoc-low-ack": { + "decription": "Disassociate stations based on excessive transmission failures or other indications of connection loss.", + "type": "boolean", + "default": false + }, + "vendor-elements": { + "decription": "This option allows embedding custom vendor specific IEs inside the beacons of a BSS in AP mode.", + "type": "string" + }, + "fils-discovery-interval": { + "type": "integer", + "default": 20, + "maximum": 20 + }, + "encryption": { + "$ref": "#/$defs/interface.ssid.encryption" + }, + "multi-psk": { + "type": "array", + "items": { + "$ref": "#/$defs/interface.ssid.multi-psk" + } + }, + "rrm": { + "$ref": "#/$defs/interface.ssid.rrm" + }, + "rate-limit": { + "$ref": "#/$defs/interface.ssid.rate-limit" + }, + "roaming": { + "anyOf": [ + { + "$ref": "#/$defs/interface.ssid.roaming" + }, + { + "type": "boolean" + } + ] + }, + "radius": { "$ref": "#/$defs/interface.ssid.radius" }, "certificates": { @@ -1795,6 +2065,9 @@ static std::string DefaultUCentralSchema = R"foo( "access-control-list": { "$ref": "#/$defs/interface.ssid.acl" }, + "captive": { + "$ref": "#/$defs/service.captive" + }, "hostapd-bss-raw": { "type": "array", "items": { @@ -2084,6 +2357,10 @@ static std::string DefaultUCentralSchema = R"foo( "examples": [ "01234567890123456789012345678901" ] + }, + "mutual-tls": { + "type": "boolean", + "default": true } } }, @@ -2693,252 +2970,48 @@ static std::string DefaultUCentralSchema = R"foo( } } }, - "service.captive.click": { - "type": "object", - "properties": { - "auth-mode": { - "type": "string", - "const": "click-to-continue" - } - } - }, - "service.captive.radius": { + "service.gps": { "type": "object", "properties": { - "auth-mode": { - "type": "string", - "const": "radius" - }, - "auth-server": { - "type": "string", - "format": "uc-host", - "examples": [ - "192.168.1.10" - ] - }, - "auth-port": { - "type": "integer", - "maximum": 65535, - "minimum": 1024, - "default": 1812 - }, - "auth-secret": { - "type": "string", - "examples": [ - "secret" - ] - }, - "acct-server": { - "type": "string", - "format": "uc-host", - "examples": [ - "192.168.1.10" - ] + "adjust-time": { + "type": "boolean", + "default": false }, - "acct-port": { + "baud-rate": { "type": "integer", - "maximum": 65535, - "minimum": 1024, - "default": 1812 - }, - "acct-secret": { - "type": "string", - "examples": [ - "secret" + "enum": [ + 2400, + 4800, + 9600, + 19200 ] - }, - "acct-interval": { - "type": "integer", - "default": 600 } } }, - "service.captive.credentials": { + "service.dhcp-relay": { "type": "object", "properties": { - "auth-mode": { - "type": "string", - "const": "credentials" + "select-ports": { + "type": "array", + "items": { + "type": "string" + } }, - "credentials": { + "vlans": { "type": "array", "items": { "type": "object", "properties": { - "username": { - "type": "string" + "vlan": { + "type": "number" }, - "password": { - "type": "string" - } - } - } - } - } - }, - "service.captive.uam": { - "type": "object", - "properties": { - "auth-mode": { - "type": "string", - "const": "uam" - }, - "uam-port": { - "type": "integer", - "maximum": 65535, - "minimum": 1024, - "default": 3990 - }, - "uam-secret": { - "type": "string" - }, - "uam-server": { - "type": "string" - }, - "nasid": { - "type": "string" - }, - "nasmac": { - "type": "string" - }, - "auth-server": { - "type": "string", - "format": "uc-host", - "examples": [ - "192.168.1.10" - ] - }, - "auth-port": { - "type": "integer", - "maximum": 65535, - "minimum": 1024, - "default": 1812 - }, - "auth-secret": { - "type": "string", - "examples": [ - "secret" - ] - }, - "acct-server": { - "type": "string", - "format": "uc-host", - "examples": [ - "192.168.1.10" - ] - }, - "acct-port": { - "type": "integer", - "maximum": 65535, - "minimum": 1024, - "default": 1812 - }, - "acct-secret": { - "type": "string", - "examples": [ - "secret" - ] - }, - "acct-interval": { - "type": "integer", - "default": 600 - }, - "ssid": { - "type": "string" - }, - "mac-format": { - "type": "string", - "enum": [ - "aabbccddeeff", - "aa-bb-cc-dd-ee-ff", - "aa:bb:cc:dd:ee:ff", - "AABBCCDDEEFF", - "AA:BB:CC:DD:EE:FF", - "AA-BB-CC-DD-EE-FF" - ] - }, - "final-redirect-url": { - "type": "string", - "enum": [ - "default", - "uam" - ] - }, - "mac-auth": { - "type": "boolean", - "default": "default" - }, - "radius-gw-proxy": { - "type": "boolean", - "default": false - } - } - }, - "service.captive": { - "allOf": [ - { - "oneOf": [ - { - "$ref": "#/$defs/service.captive.click" - }, - { - "$ref": "#/$defs/service.captive.radius" - }, - { - "$ref": "#/$defs/service.captive.credentials" - }, - { - "$ref": "#/$defs/service.captive.uam" - } - ] - }, - { - "type": "object", - "properties": { - "walled-garden-fqdn": { - "type": "array", - "items": { - "type": "string" - } - }, - "walled-garden-ipaddr": { - "type": "array", - "items": { + "relay-server": { "type": "string", "format": "uc-ip" } - }, - "web-root": { - "type": "string", - "format": "uc-base64" - }, - "idle-timeout": { - "type": "integer", - "default": 600 - }, - "session-timeout": { - "type": "integer" } } } - ] - }, - "service.gps": { - "type": "object", - "properties": { - "adjust-time": { - "type": "boolean", - "default": false - }, - "baud-rate": { - "type": "integer", - "enum": [ - 2400, - 4800, - 9600, - 19200 - ] - } } }, "service": { @@ -3000,6 +3073,9 @@ static std::string DefaultUCentralSchema = R"foo( }, "gps": { "$ref": "#/$defs/service.gps" + }, + "dhcp-relay": { + "$ref": "#/$defs/service.dhcp-relay" } } },