diff --git a/sshpiperd/upstream/yaml/schema.json b/sshpiperd/upstream/yaml/schema.json index e69de29b..408e5b76 100644 --- a/sshpiperd/upstream/yaml/schema.json +++ b/sshpiperd/upstream/yaml/schema.json @@ -0,0 +1,165 @@ +{ + "$schema": "http://json-schema.org/draft-06/schema#", + "$ref": "#/definitions/sshpiperd", + "definitions": { + "sshpiperd": { + "type": "object", + "additionalProperties": false, + "properties": { + "version": { + "type": "string" + }, + "pipes": { + "type": "array", + "items": { + "$ref": "#/definitions/pipe" + } + } + }, + "required": [ + "pipes", + "version" + ] + }, + "pipe": { + "type": "object", + "additionalProperties": false, + "properties": { + "username": { + "type": "string" + }, + "upstream_host": { + "type": "string" + }, + "ignore_hostkey": { + "type": "boolean" + }, + "authmap": { + "$ref": "#/definitions/authmap" + }, + "username_regex_match": { + "type": "boolean" + }, + "known_hosts": { + "type": "string" + }, + "known_hosts_data": { + "type": "string" + } + }, + "required": [ + "authmap", + "upstream_host" + ] + }, + "authmap": { + "type": "object", + "additionalProperties": false, + "properties": { + "mapped_username": { + "type": "string" + }, + "from": { + "type": "array", + "items": { + "$ref": "#/definitions/from" + } + }, + "to": { + "$ref": "#/definitions/to" + }, + "no_passthrough": { + "type": "boolean" + } + } + }, + "from": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "oneOf": [ + { + "enum": [ + "none", + "password", + "publickey", + "any" + ] + } + ] + }, + "password": { + "type": "string" + }, + "authorized_keys": { + "type": "string" + }, + "authorized_keys_data": { + "type": "string" + }, + "allow_any_public_key": { + "type": "boolean" + } + }, + "required": [ + "type" + ] + }, + "to": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "oneOf": [ + { + "enum": [ + "none", + "password", + "privatekey" + ] + } + ] + }, + "password": { + "type": "string" + }, + "private_key": { + "type": "string" + }, + "private_key_data": { + "type": "string" + }, + "key_map": { + "type": "array", + "items": { + "$ref": "#/definitions/keymap" + } + } + }, + "required": [ + "type" + ] + }, + "keymap": { + "type": "object", + "additionalProperties": false, + "properties": { + "authorized_keys": { + "type": "string" + }, + "authorized_keys_data": { + "type": "string" + }, + "private_key": { + "type": "string" + }, + "private_key_data": { + "type": "string" + } + } + } + } +}