You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rest/tls/README.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# TLS
2
2
3
3
4
-
For more inforamtion on using TLS in your REST apis and other services [see our documentation](https://www.ibm.com/docs/en/api-connect-graphql/saas?topic=directives-directive-rest#tls-string__title__1).
4
+
For more information on using TLS in your REST apis and other services [see our documentation](https://www.ibm.com/docs/en/api-connect-graphql/saas?topic=directives-directive-rest#tls-string__title__1).
5
5
6
6
[Environment](https://www.ibm.com/docs/en/api-connect-graphql/saas?topic=environment-tls-configuration-properties). Check that the revision is newer than : 2025-11-18.
7
7
8
8
## Using `@rest(tls:)`
9
9
10
-
This examples demonstrates a number of StepZen capabilities:
10
+
This examples demonstrates a number of API Connect for GraphQL capabilities:
11
11
- Use of `@rest(tls:)`
12
12
- stepzen service
13
13
- Simple ecmascript capability for reshaping data.
@@ -20,7 +20,7 @@ that refers to a configuration in the `config.yaml`
20
20
21
21
When the tls entry is given the name of a configuration entry, you can provide
22
22
-`ca` - the server `ca` or `ca` chain (starting with the leaf certificate)
23
-
-'cert` - the client certificate
23
+
-`cert` - the client certificate
24
24
-`key` - the client certifcate key
25
25
The data should be in PEM format.
26
26
@@ -49,18 +49,21 @@ Two safe approaches are to set the environment variables from secrets or to have
49
49
50
50
See tricks below for some possible hurdles.
51
51
52
-
53
52
### Running a test
54
53
55
54
Testing mTLS or self-signed certificates locally is best done using local API Connect for GraphQL.
56
55
In the following, we'll generate the certificates using openssl, use openssl to for trivialself-signed cert servers
57
56
and use the stepzen cli local service mode as a client.
58
57
58
+
Note: if you are not using Docker, see Tricks and hints/Container tools.
# WARNING: if you are not using Docker, please see
66
+
# Tricks and hints/Container tools
64
67
stepzen deploy
65
68
66
69
# start trivial local TLS server using openssl
@@ -77,7 +80,17 @@ stepzen service stop
77
80
```
78
81
79
82
80
-
### Tricks
83
+
## Tricks and hints
84
+
85
+
### Container tools
86
+
87
+
API Connect for GraphQL local services runs inside of a container using Docker, Podman, or other container runtime toolset. Each of these have a slightly different method whereby containers can access the host machine's localhost. The details of these are varied depending upon the actual toolset.
88
+
89
+
By default, `rest_self` uses `host.docker.internal` which works in most modern Docker environments.
90
+
91
+
For Podman, you may need to change this to `host.containers.internal` or `localhost` depending on your podman defaults. You may also need to modify your podman default configuration to allow for such access.
92
+
93
+
### env variables
81
94
82
95
You can set `STEPZEN_*` env variables in .env or using export.
0 commit comments