-
Notifications
You must be signed in to change notification settings - Fork 18
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 bash completion script and automate .cap
file lookup for for ocluster-admin
#244
Comments
The README already suggests setting an alias for this. Some shells (e.g. fish) let you make this persistent easily using Using a fixed location for admin.cap has a couple of problems: First, if you have a single cluster then it saves you one alias command over your lifetime, but if you have e.g. production and staging clusters then you need a separate set of instructions for that. The other (more theoretical) issue is that defining an alias tells the shell that you want the alias to have access to the cap file with the access token. If instead ocluster-admin hard-codes the location then either: a) You need to mess around with your security policy to grant ocluster-admin access to the secret, or Now I appreciate that our species has collectively decided that (b) is just fine for now, but I still live in hope that mainstream shells will one day work more sensibly... |
I think this could be addressed by allowing an override via CLI or config file.
Do we not have decent examples of how to solve this problem we could draw from? Again,
I'm all for improved security (not using a single shared |
Well, this is the solution: programs should only be able to access things passed to them by the user. For example, I can upload a file to a web-page by dragging it into the browser window, but the web-page can't just load whatever files it wants.
ssh doesn't directly solve this problem (any program can read your
No, sadly (which is why I say this benefit is only theoretical). Plash (the Principle of Least Authority shell) worked that way, but it was never complete enough to use as your default shell, and is no longer maintained. Anyway, I'm just giving some background on why it's designed the way it is. Basically, I think the whole idea of running programs and having them find their configuration was a mistake - it makes more sense to run a configuration and have it load the program instead. |
@mtelvers has a nice setup to streamline the use of the
ocluster-admin
. As a low priority way to improve operator quality of life and achieve some "documentation by automation" it could be cool to incorporate parts of these into the CLI and installation procedure.But in the meantime, I'll just include the scripts her shared with me here, as this at least makes them available for others who may find them useful:
To avoid having to supply the path to an
admin.cap
wile, you can make a runner script like/usr/local/bin/ci3-admin
Then get bash completions with this script added to, e.g.,
/etc/bash_completion.d/ci3-admin
Including this in the installation and CLI might mean:
ocluster-admint
looks in particular location for theadmin.cap
file ("convention over configuration")The text was updated successfully, but these errors were encountered: