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 support for text selection instead of whole file #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cdloh
Copy link
Contributor

@cdloh cdloh commented Mar 11, 2018

Currently only works with password_file due to STDIN messyness

Currently only works with password_file due to STDIN messyness
@adambullmer
Copy link
Owner

Just pushed up some fixes for the password stuff so when package control updates this it shouldn't be a problem.

I don't use ansible much anymore, but I noticed they support single value encryption. Is this PR to try and support that? I'm otherwise working on trying to flesh out some 2.4 features at the moment

@cdloh
Copy link
Contributor Author

cdloh commented Mar 12, 2018

Correct. You can have single values within YAML files that are encrypted. Ansible vault will fail if you try to decrypt the entire file as most of the data isn't encrypted.

I was looking at adding some PRE and POST saves hooks so that the plugin re-encrypts the data before saving to disk as well. But that'll require remembering the regions that have been decrypted.

@cdloh
Copy link
Contributor Author

cdloh commented Mar 12, 2018

I can rebase this against the current changes and attempt to get it to work with password input if you want?

@adambullmer
Copy link
Owner

I'm not opposed to this, but I want to look into how ansible handles the individual values. There might be a better way altogether to handle the single var encryption than text selection.

@cdloh
Copy link
Contributor Author

cdloh commented Mar 12, 2018

Looks like it's on the road map - ansible/ansible#26190

@adambullmer
Copy link
Owner

Weird they allow encrypting into a single variable without a way to undo it via cli (other than stdin). After playing around with the new features of the vault-id, it seems a bit broken. I couldn't get it to output my encrypt_string to a file like the flags suggest, I can decrypt things with the right password file but wrong env, i.e. dev@password-file worked for things encrypted with prod@password-file.

I think until they offer a more solid solution, the course I'd like to take is add another command that
handles your additions of selection input into the command, potentially as a context menu item rather than command palette. I don't think that'd be too dramatic of a change to what you've done already.

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.

2 participants