Skip to content

Commit 73f8515

Browse files
committed
Implement initial ggl-tls-helper
This adds a ggl-tls-helper binary that supports standard connections. Proxy and TPM support is not yet supported.
1 parent f545ea2 commit 73f8515

4 files changed

Lines changed: 567 additions & 6 deletions

File tree

docs/spec/tls_helper.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,20 @@ The TLS helper must be on the PATH for the Greengrass nucleus daemons. The
2121
binary name must be `ggl-tls-helper`. Greengrass nucleus daemons will invoke it
2222
by executing `ggl-tls-helper`.
2323

24-
The helper will be passed the following as its args:
24+
The process invoking the helper must pass the following as its args:
2525

2626
- `--endpoint` followed by the endpoint to connect to with TLS.
27+
- `--port` followed by the port to use for the TCP connection to the endpoint.
2728
- `--private-key` followed by the `system.privateKeyPath` config value.
2829
- `--certificate` followed by the `system.certificateFilePath` config value.
2930
- `--root-ca` followed by the `system.rootCaPath` config value.
3031

31-
If Greengrass has proxy configuration, the following environment variables are
32-
set: `ALL_PROXY`, `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`. If proxies are to
33-
be supported, these should be used for connecting the the proxy and proxy
34-
exceptions. These variables are to be interpreted in the same way as for
35-
Greengrass components, and are recognized by libraries like OpenSSL and libcurl.
32+
The invoking process may additionally set the following args:
33+
34+
- `--proxy` followed by the proxy HTTP/HTTPS endpoint to use.
35+
36+
When passed a `--proxy` arg, the TLS helper MUST either use it for the
37+
connection or exit with a non-zero error code.
3638

3739
The TLS helper will also get a control socket at file descriptor `3`. This will
3840
be a unix domain socket. Except in case of an error, the helper MUST use the the

misc/iwyu_mappings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- symbol: ["SOCK_CLOEXEC", "private", "<sys/socket.h>", "public"]
1313
- symbol: ["SOCK_STREAM", "private", "<sys/socket.h>", "public"]
1414
- symbol: ["SOL_SOCKET", "private", "<sys/socket.h>", "public"]
15+
- symbol: ["SO_ERROR", "private", "<sys/socket.h>", "public"]
1516
- symbol: ["SO_PEERCRED", "private", "<sys/socket.h>", "public"]
1617
- symbol: ["SO_RCVTIMEO", "private", "<sys/socket.h>", "public"]
1718
- symbol: ["SO_SNDTIMEO", "private", "<sys/socket.h>", "public"]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# aws-greengrass-lite - AWS IoT Greengrass runtime for constrained devices
2+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
ggl_init_module(ggl-tls-helper LIBS ggl-sdk ggl-common PkgConfig::openssl)

0 commit comments

Comments
 (0)