From 0b9c08f38ec02b960aab7cf0ef8fd6452a4214a3 Mon Sep 17 00:00:00 2001 From: "Jason T. Wong" Date: Thu, 16 May 2024 13:03:39 -0400 Subject: [PATCH] add device_tunnel_port to create tunnel --- src/openapi/peridio-admin-openapi.yaml | 23 +++++++++++++++++++---- src/openapi/peridio-device-openapi.yaml | 7 +------ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/openapi/peridio-admin-openapi.yaml b/src/openapi/peridio-admin-openapi.yaml index a0130b55..6ad45061 100644 --- a/src/openapi/peridio-admin-openapi.yaml +++ b/src/openapi/peridio-admin-openapi.yaml @@ -339,14 +339,17 @@ paths: $ref: "#/components/schemas/device-prn" description: | Identifies which device to create a tunnel for. + device_tunnel_port: + $ref: "#/components/schemas/device-tunnel-port" ttl: - type: integer + type: number default: 3600 description: The amount of time in seconds that the tunnel is available for. minimum: 0 maximum: 3600 required: - device_prn + - device_tunnel_port responses: "201": description: Ok. @@ -3817,6 +3820,10 @@ components: enum: - on - off + device-tunnel-port: + type: number + examples: [22] + description: The port on which the device is listening for service traffic (e.g. ssh). event-prn: allOf: - $ref: "#/components/schemas/prn" @@ -4633,9 +4640,7 @@ components: description: The device's public key for wireguard. examples: [Y4nCIXdpb+f3WgPi0377FDPCAfP+st82s98lTRepHEk=] device_tunnel_port: - type: number - examples: [22] - description: The port on which the device is listening for service traffic (e.g. ssh). + $ref: "#/components/schemas/device-tunnel-port" server_proxy_ip_address: type: string examples: [10.0.0.1] @@ -4665,8 +4670,18 @@ components: - "requested" - "open" - "closed" + device_prn: + $ref: "#/components/schemas/device-prn" + organization_prn: + $ref: "#/components/schemas/prn" prn: $ref: "#/components/schemas/tunnel-prn" + inserted_at: + type: string + format: date-time + updated_at: + type: string + format: date-time tunnel-prn: allOf: - $ref: "#/components/schemas/prn" diff --git a/src/openapi/peridio-device-openapi.yaml b/src/openapi/peridio-device-openapi.yaml index 07f6094f..86796b3e 100644 --- a/src/openapi/peridio-device-openapi.yaml +++ b/src/openapi/peridio-device-openapi.yaml @@ -354,11 +354,7 @@ paths: device_proxy_port: type: number description: The port on which the device is listening for wireguard UDP traffic. - examples: [530000] - device_tunnel_port: - type: number - description: The port to which wireguard will forward traffic to on the device. - examples: [22] + examples: [53000] device_public_key: type: string examples: [Y4nCIXdpb+f3WgPi0377FDPCAfP+st82s98lTRepHEk=] @@ -367,7 +363,6 @@ paths: - cidr_blocks - device_proxy_port - device_public_key - - device_tunnel_port - port_ranges - tunnel_prn responses: