Skip to content

Commit 9792ce9

Browse files
committed
Add forgot password instructions for gateway
This consists of querying and decrypting password into plain-text. Signed-off-by: Alex Ellis (VMware) <[email protected]>
1 parent 3081437 commit 9792ce9

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

docs/deployment/docker-swarm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $ git clone https://github.com/openfaas/faas && \
3636
```
3737

3838
!!! info
39-
Basic authentication is now enabled by default for your protection. If you need to disable it pass the flag --no-auth to the ./deploy_stack.sh command above.
39+
As of OpenFaaS 0.8.6 basic authentication will be enabled by default when running ./deploy\_stack.sh. If you need to disable it pass the flag `--no-auth` to the ./deploy_stack.sh script as above.
4040

4141
### 2.1 Store your admin credentials
4242

@@ -52,9 +52,9 @@ Attempting to create credentials for gateway..
5252
password-stdin
5353
```
5454

55-
Run the command as you see it in your console, do not copy/paste the login command.
55+
Run the command as you see it in your console, do not copy/paste the login command. Once you run `faas-cli login` your password will be stored as a hash at `~/.openfaas/config.yaml`.
5656

57-
You will need the password for using the UI and REST API on the gateway, but you can invoke your functions without it.
57+
You will need the password for the CLI, UI and REST API on the gateway, but you can invoke your functions without it.
5858

5959
## 2.1 Test out the UI
6060

docs/deployment/troubleshooting.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,16 @@ $ docker service ls -q | xargs docker service rm
198198

199199
*Use with caution*
200200

201+
#### I forgot my gateway password
202+
203+
```
204+
$ docker service rm print-password \
205+
; docker service create --detach --secret basic-auth-password --restart-condition=none --name=print-password alpine:3.7 cat /run/secrets/basic-auth-password
206+
207+
$ docker service logs print-password
208+
21f596c9cd75a0fe5e335fb743995d18399e83418a37a79e719576a724efbbb6
209+
```
210+
201211
### Kubernetes
202212

203213
If you have deployed OpenFaaS to the recommended namespaces then functions are in the `openfaas-fn` namespace and the core services are in the `openfaas` namespace. The `-n` flag to `kubectl` sets the namespace to look at.
@@ -268,6 +278,21 @@ From within the `faas-netes` folder:
268278
$ kubectl delete -f namespaces.yml,./yaml/
269279
```
270280

281+
#### I forgot my gateway password
282+
283+
Use the following:
284+
285+
```
286+
kubectl get -n openfaas secret -o yaml
287+
```
288+
289+
Then copy/paste the value as below:
290+
291+
```
292+
$ echo -n "YWRtaW4xMjM0Cg==" | base64 --decode
293+
admin1234
294+
```
295+
271296
## Watchdog
272297

273298
### Debug your function without deploying it

0 commit comments

Comments
 (0)