openziti / ziti

The parent project for OpenZiti. Here you will find the executables for a fully zero trust, application embedded, programmable network @OpenZiti
https://openziti.io
Apache License 2.0
2.69k stars 153 forks source link

intercept.v1 config should permit underscores in the address #1119

Closed dovholuknf closed 1 year ago

dovholuknf commented 1 year ago

right now the intercept.v1 config is failing to validate a FQDN containing an underscore. The intercept.v1 schema references the built-in "hostname" field. https://json-schema.org/understanding-json-schema/reference/string.html#hostnames

It seems like we need/want to use the built-in "idn-hostname" instead which refers to "internationalized domain name" which allows for underscores in the name, whereas "hostname" does not.

example:

ziti edge create config underscore_test intercept.v1 '{"protocols":["tcp"],"addresses":["will_it_blend.ziti"], "portRanges":[{"low":80, "high":"80"}]}'

returns:

error: error creating configs instance in Ziti Edge Controller at https://ctrl.clint.demo.openziti.org:8441/edge/management/v1. Status code: 400 Bad Request, Server returned: {
    "error": {
        "cause": {
            "field": "addresses.0",
            "reason": "addresses.0 is invalid: addresses.0: Must validate one and only one schema (oneOf)",
            "value": "will_it_blend.ziti"
        },
NetFoundry-Zendesk commented 1 year ago
Comment from Zendesk:
Zendesk: 10922 linked successfully.
NetFoundry-Zendesk commented 1 year ago
Comment from Zendesk:
Zendesk: 10982 linked successfully.