franela / vault Goto Github PK
View Code? Open in Web Editor NEWVault - cross-platform GPG KV store for teams made easy
License: MIT License
Vault - cross-platform GPG KV store for teams made easy
License: MIT License
The vault add
command could be improved by letting the user run something like:
vault add [email protected]
Instead of forcing the user to search for the signature. Of course this will only work if the user already trusts the key associated with [email protected]
Validators should:
Installing
You need sure the copy the correct binary into your PATH and to have GPG installed.
That might be not enough for someone wanting to test the software in 5 mins. For us python people it's not trivial to understand these go projects ;)
Pretty-print JSON in Vaultfile, that will help users that want to "cat" the Vaultfile and also when running "diff", "patch", manually reviewing it, etc.
When a user creates a new vault, add "self" as recipient. In other words, search the OS's keyring for a PGP key that has both public/private and add that user as recipient. If there is more than one key, show a warning and no-op.
Init should also have a --no-self-add
(or similar) to prevent this behaviour.
Besides creating the vault file (if it's not present) This command should issue a git init
inside the current directory and configure the vault repair
command as a pre commit hook
A quick read of the source seems to indicate that in https://github.com/franela/vault/blob/master/gpg/gpg.go#L75 you guys create a temp file with 777? Maybe change that to more restricting perms to avoid other users reading sensitive info from them.
Potentially also vuln at https://github.com/franela/vault/blob/master/gpg/gpg.go#L101
The idea is to add a --all
option to the vault recipients command which will make a difference between all the recipients from gpg and the ones in your vaultfile.
This way it'd be really easy to know if you need to import someone into your vault or if there's someone in your vault which you don't have in your pubring
Vault looks like:
⌂63% [pablo:/tmp/foo] $ cat Vaultfile
{"Recipients":[{"Name":"andres","Fingerprint":"99010C0E0C44AA90B6D6D2412D32F868AA4D8C80"}]}⌂63% [pablo:/tmp/foo] $
Set command:
⌂63% [pablo:/tmp/foo] 130 $ ./vault set . lala
exit status 2[pablo:/tmp/foo] 1
Several issues:
\n
after exit status 2
Vault repair re-encodes all the files in the Vault. If for some reason the user executing vault repair
does not have permissions to decrypt some file then vault throws a horrible error and exists.
To do this we'll have to iterate parent directories until we find the Vaultfile
⌂73% [pablo:/tmp/foo] 1 $ ./vault add D39DC0E3:foo
Supplied fingerprint "ӝ��" does not have the correct size
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.