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: docs/deployment/pro.md
+2
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,8 @@ queueMode: jetstream
86
86
87
87
nats:
88
88
streamReplication: 1
89
+
authorization:
90
+
enabled: true
89
91
```
90
92
91
93
You can find explanations for each configuration item in the [values-pro.yaml](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/values-pro.yaml) file on GitHub.
Copy file name to clipboardexpand all lines: docs/openfaas-pro/jetstream.md
+27-1
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ To enable JetSteam for OpenFaaS set `jetstream` as the queue mode in the values.
41
41
```yaml
42
42
queueMode: jetstream
43
43
nats:
44
-
streamReplication: 1
44
+
streamReplication: 1
45
45
```
46
46
47
47
If the NATS pod restarts, you will lose all messages that it contains. In your development or staging environment, this shouldn't happen very often.
@@ -58,6 +58,32 @@ nats:
58
58
port: "4222"
59
59
```
60
60
61
+
## Authentication for NATS
62
+
63
+
We recommend enabling authentication for NATS to limit the access to the NATS server.
64
+
65
+
To enable authorization for NATS add the following to `nats` section in your values.yaml file.
66
+
67
+
```yaml
68
+
nats:
69
+
authorization:
70
+
enabled: true
71
+
```
72
+
73
+
We use a Helm Chart hook to generate an access token on first installation. If you are upgrading an existing OpenFaaS installation or using an external NATS cluster you will need to create the token secret manually.
74
+
75
+
```sh
76
+
# openssl is preferred to generate a random secret:
77
+
openssl rand -base64 32 > ./nats-token
78
+
79
+
kubectl create secret generic \
80
+
-n openfaas \
81
+
nats-token \
82
+
--from-file token=./nats-token
83
+
```
84
+
85
+
Make sure to configure the same access token through the NATS helm chart if you are running an external NATS cluster. Full instructions for external NATS are available in the [Customer Community](https://github.com/openfaas/customers/).
0 commit comments