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

Ability to export a given list of keys values to a file #47

Closed
oleiade opened this issue Feb 3, 2014 · 4 comments
Closed

Ability to export a given list of keys values to a file #47

oleiade opened this issue Feb 3, 2014 · 4 comments
Assignees
Milestone

Comments

@oleiade
Copy link
Owner

oleiade commented Feb 3, 2014

I personaly use trousseau most of the time as a convient way to spread my web services credentials over the devices I use. And it would be really useful to be able to do something like this for example:

$ trousseau extract aws_access_key_id aws_secret_access_key > ~/.aws/mykeys.rc
$ cat ~/aws/mykeys.rc
aws_access_key_id=abc
aws_secret_access_key=123
@ghost ghost assigned oleiade Feb 3, 2014
@oleiade oleiade modified the milestones: Backlog, 0.3.0 Feb 25, 2014
@fdv
Copy link

fdv commented Apr 17, 2014

I'd rather see:

$ trousseau extract aws_access_key_id aws_secret_access_key
$ ls
aws_access_key_id
aws_secret_access_key

More convenient to use IMHO

@oleiade
Copy link
Owner Author

oleiade commented Apr 17, 2014

I don't know yet what I think about a new command like extract. Both sounds like a great idea and a "might be overkill" to me. What do you think?

What would you think of extending the export command as following:

$ trousseau export --key aws_access_key_id ./aws_access_key

@oleiade
Copy link
Owner Author

oleiade commented Apr 17, 2014

What about

$ trousseau extract aws_access_key aws_secret_access_key --output-file aws_credentials

Would even permit something like this

$ trousseau extract aws_access_key_id aws_secret_access_key \
                                --output aws_credentials.rc
                                --prefix 'export '
                                --separator '='
                                --key-transformation='uppercase'

Would end up creating a file looking like this

export AWS_ACCESS_KEY_ID=jniquen983niunknl
export AWS_SECRET_ACCESS_KEY=iuj39813nidj1lklkdnhb1iwudh9182nd1iu2ndkj12n

@oleiade oleiade modified the milestones: 0.3.0, Backlog Apr 17, 2014
@oleiade
Copy link
Owner Author

oleiade commented Apr 17, 2014

Extract feels a bit too intrusive to me after all.
If users want to do such extraction and transformations, manipulating the trousseau export command stdout would do it better.

Let's stick to a simple

$ trousseau get 'oleiade.ssh.id_rsa' --file ~/.ssh/id_rsa

What do you think @fdv

oleiade pushed a commit that referenced this issue Apr 21, 2014
@oleiade oleiade closed this as completed Apr 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants