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
Move REST API setup instructions to installation page
Move installation and configuration details for the REST API from
rest-api.md to installation.md so the API reference page serves
strictly as an endpoint reference.
- Add 'Setup the REST API' section to installation.md with access
token, ingress, and OAuth configuration instructions
- Update rest-api.md to cross-reference the installation page
- Update configuration table to reflect clientApi.enabled defaults
to true
- Update API docs to reflect auto generated access token
Signed-off-by: Han Verstraete (OpenFaaS Ltd) <han@openfaas.com>
Copy file name to clipboardExpand all lines: docs/uplink/installation.md
+75-2Lines changed: 75 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -249,6 +249,77 @@ NAME READY SECRET AGE
249
249
client-router-cert True client-router-cert 30m
250
250
```
251
251
252
+
## Setup the REST API
253
+
254
+
The REST API for Uplink is enabled by default and accessible on the same domain as the client-router under the `/v1` path prefix. For example, if your client-router domain is `uplink.example.com`, the API will be available at `https://uplink.example.com/v1`.
255
+
256
+
See the [REST API reference](/uplink/rest-api/) to learn how to invoke the API and for a full list of endpoints.
257
+
258
+
Optionally, the client-api can be exposed on a [separate domain](#configure-a-separate-api-domain).
259
+
260
+
### Access token
261
+
262
+
An access token is generated by Helm and stored as a Kubernetes secret during installation. This token can be used to authenticate with the API.
263
+
264
+
If you need to create the token manually, for example to use a specific value, you can do so before installing the chart:
If the secret already exists, Helm will use the existing token instead of generating a new one.
279
+
280
+
> See the [OAuth configuration](#configure-oauth) section for instructions on how to enable OAuth.
281
+
282
+
### Configure OAuth
283
+
284
+
You can configure any OpenID Connect (OIDC) compatible identity provider for use with Inlets Uplink.
285
+
286
+
1. Register a new client (application) for Inlets Uplink with your identity provider.
287
+
2. Enable the required authentication flows.
288
+
The Client Credentials flow is ideal for serve-to-server interactions where there is no direct user involvement. This is the flow we recommend and use in our examples any other authentication flow can be picked depending on your use case.
289
+
3. Configure Client API
290
+
291
+
Update your `values.yaml` file and add the following parameters to the `clientApi` section:
292
+
293
+
```yaml
294
+
clientApi:
295
+
# OIDC provider url.
296
+
issuerURL: "https://myprovider.example.com"
297
+
298
+
# The audience is generally the same as the value of the domain field, however
299
+
# some issuers like keycloak make the audience the client_id of the application/client.
300
+
audience: "uplink.example.com"
301
+
```
302
+
303
+
The `issuerURL` needs to be set to the url of your provider, eg. `https://accounts.google.com` for google or `https://example.eu.auth0.com/` for Auth0.
304
+
305
+
The `audience` is usually the client apis public URL although for some providers it can also be the client id.
306
+
307
+
### Configure a separate API domain
308
+
309
+
By default, the client-api is exposed on the same domain as the client-router under the `/v1` path prefix. If you prefer to use a separate domain, set the `clientApi.domain` field in your `values.yaml` file and enable the dedicated ingress:
310
+
311
+
```yaml
312
+
clientApi:
313
+
# Use a dedicated domain for the client API
314
+
domain: clientapi.example.com
315
+
316
+
tls:
317
+
ingress:
318
+
enabled: true
319
+
```
320
+
321
+
When a dedicated domain is set and `clientApi.tls.ingress.enabled` is `true`, a separate Ingress resource is created for the client-api.
322
+
252
323
## Download the tunnel CLI
253
324
254
325
We provide a CLI to help you create and manage tunnels. It is available as a plugin for the inlets-pro CLI.
@@ -334,8 +405,10 @@ Overview of inlets-uplink parameters in `values.yaml`.
334
405
|`clientRouter.service.nodePort`| Client router service port for NodePort service type, assigned automatically when left empty. (only if clientRouter.service.type is set to "NodePort")|`nil`|
335
406
|`tunnelsNamespace`| Deployments, Services and Secrets will be created in this namespace. Leave blank fora cluster-wide scope, with tunnelsin multiple namespaces. |`""`|
336
407
|`inletsVersion`| Inlets Pro release version for tunnel server Pods. |`0.9.12`|
|`clientApi.domain`| Domain for a dedicated client API ingress. If left empty and ingress is enabled, the API is exposed on the client-router's domain under the `/v1` path prefix. | `""` |
|`clientApi.domain`| Domain for a dedicated client API ingress. By default the API is exposed on the client-router's domain under the `/v1` path prefix. | `""` |
410
+
| `clientApi.tls.ingress.enabled` | Enable a dedicated ingress for the client API. Requires `clientApi.domain` to be set. | `false` |
411
+
| `clientApi.tls.ingress.annotations` | Annotations to be added to the client API ingress resource. | `{}` |
339
412
| `clientApi.image` | Container image used for the client API. | `ghcr.io/openfaasltd/uplink-api:0.1.5` |
This token can be used to authenticate with the API.
27
-
28
-
> See the [OAuth configuration](#configure-oauth) section for instructions on how to enable OAuth.
29
-
30
-
Add the following parameters to your uplink `values.yaml` file and update the deployment:
31
-
32
-
```yaml
33
-
clientApi:
34
-
enable: true
35
-
36
-
tls:
37
-
ingress:
38
-
enabled: true
39
-
```
40
-
41
-
By default, the client-api will be exposed on the same domain as the client-router under the `/v1` path prefix. For example, if your client-router domain is `uplink.example.com`, the API will be available at `https://uplink.example.com/v1`.
42
-
43
-
If you prefer to use a separate domain for the client-api, set the `clientApi.domain` field:
44
-
45
-
```yaml
46
-
clientApi:
47
-
enable: true
48
-
49
-
# Use a dedicated domain for the client API
50
-
domain: clientapi.example.com
51
-
52
-
tls:
53
-
ingress:
54
-
enabled: true
55
-
```
56
-
57
-
When a dedicated domain is set, a separate Ingress resource is created for the client-api.
5
+
For setup instructions, including how to configure API authentication and enable the API ingress, see [Setup the REST API](/uplink/installation/#setup-the-rest-api).
58
6
59
7
## Authentication
60
8
@@ -74,7 +22,7 @@ Use the token as bearer token in the `Authorization` header when making requests
74
22
75
23
### OAuth
76
24
77
-
If you have OAuth enabled you can obtain a token from your provider that can be used to invoke the Uplink Client API.
25
+
If you have OAuth enabled you can obtain a token from your provider that can be used to invoke the Uplink Client API. See [Configure OAuth](/uplink/installation/#configure-oauth) for setup instructions.
78
26
79
27
The example uses the client credentials grant. Replace the token url, client id and client secret with the values obtained from your identity provider.
80
28
@@ -266,28 +214,3 @@ curl -i \
266
214
-H "Authorization: Bearer ${TOKEN}" \
267
215
"$CLIENT_API/v1/namespace/$NAME"
268
216
```
269
-
270
-
## Configure OAuth
271
-
272
-
You can configure any OpenID Connect (OIDC) compatible identity provider for use with Inlets Uplink.
273
-
274
-
1. Register a new client (application) for Inlets Uplink with your identity provider.
275
-
2. Enable the required authentication flows.
276
-
The Client Credentials flow is ideal for serve-to-server interactions where there is no direct user involvement. This is the flow we recommend and use in our examples any other authentication flow can be picked depending on your use case.
277
-
3. Configure Client API
278
-
279
-
Update your `values.yaml` file and add to following parameters to the `clientApi` section:
280
-
281
-
```yaml
282
-
clientApi:
283
-
# OIDC provider url.
284
-
issuerURL: "https://myprovider.example.com"
285
-
286
-
# The audience is generally the same as the value of the domain field, however
287
-
# some issuers like keycloak make the audience the client_id of the application/client.
288
-
audience: "uplink.example.com"
289
-
```
290
-
291
-
The `issuerURL` needs to be set to the url of your provider, eg. `https://accounts.google.com` for google or `https://example.eu.auth0.com/` for Auth0.
292
-
293
-
The `audience` is usually the client apis public URL although for some providers it can also be the client id.
0 commit comments