-
Notifications
You must be signed in to change notification settings - Fork 223
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
Proposal Enable basic auth for CLI #178
Comments
Btw Happy to work on this. (I take it, this would be optional and use cli arguments?) |
I've updated the design brief and commented on #180. Still needs to have the design reviewed. |
what about using an env var instead of a file in home folder? It seems cleaner and isn't polluting the FS with secrets (which seems to be the concern over cli history). For now, it empowers users to come up with their own mechanism, and we get the functionality without painting into a corner? |
Hi, I would suggest adding a The
The first implementation would store a JSON array of OpenFaaS endpoints at If the We should also consider a I've started working on this, please let me know if my proposal is suitable for OpenFaaS. |
Hi Stefan, I think In your example config over on the Weave repo we should ideally only protect the /system/ and /ui/ endpoints with basic auth and leave /function and /async-function open. This means administration and listing is protected but by default invocation is not. At the point of storing a credential we should also validate it ahead of time. I also suspect we will want to "cowardly refuse" to send credentials over HTTP (i.e. when SSL is not being used) The help text looks good but one thing stands out - we should probably not allow reading password value from the command-line.
Alex |
Forcing the password to be submitted via stdin will make CI workloads harder I think. All FOSS projects I've seen using TravisCI, Drone, etc are passing the credentials to docker login via -p flag since most CI tools allows you to store the password value as a secret. The build environment gets destroyed after each run so bash history is not much of a concern. Regarding the keychain store, OpenFaaS users will need to I would go for the first implementation with the JSON file and the password flag. For non SSL addresses I would add a I think enforcing a high security standard will make some users give up auth altogether. Let me know your thoughts on this. |
This is going to sound trivial, but would it be possible to use YAML instead of JSON? I know it might sound a bit 🙄; but lots of the tooling is already working with YAML, and by working with YAML apparently it can load JSON (I've never tried that) If it is something you'd be interested in, then there is lots of opportunities for reuse. @johnmccabe uses this to load config from YAML in https://github.com/johnmccabe/openfaas-bitbar, for multiple servers, so I'm sure this would be equally applicable to that project. Deploy already can use, I'm borrowing Johns Code to play with an Ubuntu notification area. It means there are places to standardise and follow practices that at least one other contributor is known to be versed in. Also as the method for adding basic auth itself already has tests, feel free to use if you want, it's 2 files |
I've not seen YAML used for config much, but I had a similar thought to this earlier for consistency. We also need a config file for third party templates. |
If YAML would help with consistency sure I'll use that. Regarding openfaas-bitbar, looks like it uses On the long run, maybe we should consider renaming the bitbar config to |
Makes sense. Bitbar is currently a bolt-on project by @johnmccabe - I'm sure he'd rename his file. |
Expected Behaviour
Pass username/password to remote calls - deploy/list/invoke etc.
Current Behaviour
Need to use API / curl.
Possible Solution / Design
We will need to discuss and review a design here before moving forward.
Options for reading:
password
- should not follow this approach due to bash cache historyA combination of both approaches may involve creating a hash of the username/password and storing that in an ~/.openfaas/config.json file. For Windows/Mac the native keychain would be a better place to store sensitive data.
Other concerns:
Multiple gateways are supported so we need to find a way to accept credentials or a token per gateway.
Context
Supports blog post for WeaveWorks
The text was updated successfully, but these errors were encountered: