Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ Key settings:

## Supported Services

See README.md for complete service list. Common services:

- SSH (22), HTTP (80), HTTPS (443), RDP (3389), VNC (5900)
With support of localproxy application can support a wide range of protocol but
for the first release only SSH (22) and VNC (5900) will be supported.

## Build & Test

Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ A Greengrass component that enables secure tunneling to IoT devices using AWS
IoT Device Management Secure Tunneling service.

This component listens for tunnel notifications and automatically establishes
secure tunnels using the localproxy client, supporting services like SSH, HTTP,
HTTPS, RDP, and VNC.
secure tunnels using the localproxy client, supporting services like SSH and
VNC.

## Quick Start

Expand Down Expand Up @@ -42,9 +42,6 @@ Tunnel timeout duration in seconds.
| Service | Port |
| ------- | ---- |
| SSH | 22 |
| HTTP | 80 |
| HTTPS | 443 |
| RDP | 3389 |
| VNC | 5900 |

## Resource Usage
Expand Down
9 changes: 0 additions & 9 deletions src/tunnel_notification_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ static uint16_t get_port_from_service(GgBuffer service) {
if (gg_buffer_eq(service, GG_STR("SSH"))) {
return 22;
}
if (gg_buffer_eq(service, GG_STR("HTTP"))) {
return 80;
}
if (gg_buffer_eq(service, GG_STR("HTTPS"))) {
return 443;
}
if (gg_buffer_eq(service, GG_STR("RDP"))) {
return 3389;
}
if (gg_buffer_eq(service, GG_STR("VNC"))) {
return 5900;
}
Expand Down
18 changes: 9 additions & 9 deletions test/unit/test_service_name_validation.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,27 +65,27 @@ static void test_ssh_service_accepted(void) {
);
}

static void test_http_service_accepted(void) {
static void test_http_service_rejected(void) {
uint8_t arena_mem[1024];
GgMap notification = create_notification(arena_mem, "HTTP");
TEST_ASSERT_EQUAL(
GG_ERR_OK, handle_tunnel_notification(notification, &config)
GG_ERR_INVALID, handle_tunnel_notification(notification, &config)
);
}

static void test_https_service_accepted(void) {
static void test_https_service_rejected(void) {
uint8_t arena_mem[1024];
GgMap notification = create_notification(arena_mem, "HTTPS");
TEST_ASSERT_EQUAL(
GG_ERR_OK, handle_tunnel_notification(notification, &config)
GG_ERR_INVALID, handle_tunnel_notification(notification, &config)
);
}

static void test_rdp_service_accepted(void) {
static void test_rdp_service_rejected(void) {
uint8_t arena_mem[1024];
GgMap notification = create_notification(arena_mem, "RDP");
TEST_ASSERT_EQUAL(
GG_ERR_OK, handle_tunnel_notification(notification, &config)
GG_ERR_INVALID, handle_tunnel_notification(notification, &config)
);
}

Expand Down Expand Up @@ -116,9 +116,9 @@ static void test_empty_service_rejected(void) {
int main(void) {
UNITY_BEGIN();
RUN_TEST(test_ssh_service_accepted);
RUN_TEST(test_http_service_accepted);
RUN_TEST(test_https_service_accepted);
RUN_TEST(test_rdp_service_accepted);
RUN_TEST(test_http_service_rejected);
RUN_TEST(test_https_service_rejected);
RUN_TEST(test_rdp_service_rejected);
RUN_TEST(test_vnc_service_accepted);
RUN_TEST(test_random_service_rejected);
RUN_TEST(test_empty_service_rejected);
Expand Down