Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Basic Auth to the gateway #5

Merged
merged 1 commit into from Dec 30, 2019
Merged

Conversation

@Waterdrips
Copy link
Contributor

Waterdrips commented Dec 29, 2019

Add and enable basic auth plugin.

Users can now find their basic auth username and passwords in the basic-auth-user and basic-auth-password files which are generated on first-run of faasd.

users will then need to authenticate with their gateway, this can be done like this:

export OPENFAAS_URL=<ip-from-hosts-file>:8080
cat gateway-basic-auth | faas-cli login --username admin --password-stdin 

This was tested by implementing basic auth plugin, then trying to connect to gateway via UI and CLI without authenticating (alex also connected to my local gateway using inlets). No user action was allowed when not authenticated.

Once authenticated we could create and invoke functions.

Signed-off-by: Alistair Hey alistair@heyal.co.uk

@alexellis

This comment has been minimized.

Copy link
Owner

alexellis commented Dec 29, 2019

The readme will need an update for this to explain how to fetch the password.

Copy link
Owner

alexellis left a comment

Congrats on the PR. A few comments have been left

cmd/up.go Outdated Show resolved Hide resolved
cmd/up.go Outdated Show resolved Hide resolved
cmd/up.go Outdated Show resolved Hide resolved
cmd/up.go Outdated Show resolved Hide resolved
cmd/up.go Outdated Show resolved Hide resolved
@Waterdrips Waterdrips force-pushed the Waterdrips:add-basic-auth branch from e7bf40e to 025f547 Dec 29, 2019
@Waterdrips

This comment has been minimized.

Copy link
Contributor Author

Waterdrips commented Dec 29, 2019

Comments addressed.

cmd/up.go Outdated Show resolved Hide resolved
cmd/up.go Outdated Show resolved Hide resolved
@alexellis

This comment has been minimized.

Copy link
Owner

alexellis commented Dec 30, 2019

Not all of my commit messages have been verbose on this side-project, but I think that the commit message's body text could be improved for this PR. It could perhaps say how this was tested.

https://chris.beams.io/posts/git-commit/

Add and enable basic auth to the gateway. This allows users to
put their gateway on the internet and expose it to public networks
without anyone being able to control their deployments.

Added information to the README that allows users to get their
gatewau basic auth password and username

Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
@Waterdrips Waterdrips force-pushed the Waterdrips:add-basic-auth branch from 025f547 to c0383bc Dec 30, 2019
@alexellis

This comment has been minimized.

Copy link
Owner

alexellis commented Dec 30, 2019

Thank you for making the updates, 👍

It could perhaps say how this was tested.

I would have liked to have seen this in the commit message and in the PR description too.

@alexellis alexellis merged commit 61e2d16 into alexellis:master Dec 30, 2019
1 check passed
1 check passed
Travis CI - Pull Request Build Passed
Details
@alexellis

This comment has been minimized.

Copy link
Owner

alexellis commented Dec 30, 2019

I've cut this release, could you update the PR description with the commands like faas-cli login etc? https://github.com/alexellis/faasd/releases/tag/0.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.