8 Commits

Author SHA1 Message Date
Alex Ellis (VMware)
169431375d Enable hashed passwords with PowerShell
- PR #929 introduced the ability to generate passwords for the
gateway admin user, this is a good step forwards for Windows
users. It did introduce an inconsistency in the format that
passwords are stored by not using a form of hashing. Hashing
of secrets is used extensively within OpenFaaS/OpenFaaS Cloud
whether with Swarm or Kubernetes via helm. If there are
concerns about using a hashed value for a password I would
suggest raising an issue to track this and have any decision
we make applied for all users (not just PowerShell users).

As a  compromise I've introduced hashing by default and added
a new flag called -noHash which can be used to replicate the
behaviour of the original PR.

After feedback from other contributors I also looked into whether
the flag syntax could match the existing syntax but left this as
is. Bash will use --no-auth and PowerShell will use --noAuth.

This was tested on Docker Swarm on Windows.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-11-04 20:37:11 +00:00
John McCabe
47a834c830 Print same deploying message as sh installer
Signed-off-by: John McCabe <john@johnmccabe.net>
2018-11-04 20:13:18 +00:00
John McCabe
cb4aa8f352 Suppress stdout when creating secrets
- copies behaviour from bash installer

Signed-off-by: John McCabe <john@johnmccabe.net>
2018-11-04 20:13:18 +00:00
John McCabe
785bd6d69b Add -help to deploy_stack.ps1
Signed-off-by: John McCabe <john@johnmccabe.net>
2018-11-04 20:13:18 +00:00
John McCabe
5d7776c951 Generate user/pass for PowerShell deploy script
- Generates the password to mirror deploy_stack.sh
- Uses hardcoded admin to mirror deploy_stack.sh
- Uses throw to exit when error
- Updates faas-cli login command for Powershell

Signed-off-by: John McCabe <john@johnmccabe.net>
2018-11-04 20:13:18 +00:00
John McCabe
7d5955b6f2 Check that Docker is in Swarm mode
This commit updates deploy_stack.ps1 to check that Docker is running in
Swarm mode before proceeding.

Signed-off-by: John McCabe <john@johnmccabe.net>
2018-11-04 20:13:18 +00:00
John McCabe
8d041efd0c Prompt for user/password in deploy_stack.ps1
This commit updates the Windows deploy_stack.ps1 to set the
basic-auth-user and basic-auth-password secrets if absent.

Signed-off-by: John McCabe <john@johnmccabe.net>
2018-11-04 20:13:18 +00:00
John McCabe
a18c2e109a Add PowerShell script to start Docker stack
This commit adds a PowerShell script that mirrors the existing `deploy_stack.*` scripts.

It also checks that docker is installed and returns a readable error if not found (the alternative is a rather cryptic PowerShell error).

The docker stack command itself returns a readable error if no swarm has been initialised.

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-08-16 21:48:53 +01:00