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

Config store helper #328

Open
wants to merge 2 commits into
base: v2.7
Choose a base branch
from

Conversation

gregod-com
Copy link

This MR allows to define a local executable via the flag --config-helper or EnvVar RANCHER_CONFIG_HELPER to store the rancher config.

The methods to load and write the config are intercepted and by default keep the existing method of storing the config as file on the filesystem. (~/.rancher/cli2.json)
If the flag --config-helper is set to a other values than built-in, the method invokes a call to the defined executable with the argument get to load the config and store to persist the config.

An example config-helper could look like this:

rancher-helper

#!/bin/zsh

case "$1" in
    get)   gopass show -o -y rancher-config ;;
    store) echo $2 | gopass insert -f rancher-config ;;
esac

The motivation for this MR is to allow a secure storage of the credentials found in the rancher config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant