Skip to content

Commit

Permalink
v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nir0s committed Apr 2, 2017
1 parent d56b00b commit a0da024
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 17 deletions.
14 changes: 14 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
**0.6.1** (2017.04.02)

* Remove official Python2.6 support! Most things will probably work, but not guaranteed.
* Add `ghost ssh` connecting through proxy using ProxyCommand.
* Add `ghost put` `--add` flag to add values to an existing key.
* Fix init in TinyDB and SqlAlchemy backends not idempotent.
* Fix SqlAlchemy backend not creating a non-existing database on non-SQLite storage.
* Allow to pass arbitrary directives to any ssh command via the `extend` value in an `ssh` type key.
* Delete stale stash when initializing a stash without being able to write its passphrase file due to filesystem access errors.
* Disallow using a stash before it is initialized.
* Fix `ghost ssh` failing miserably on non-existing key.
* Fix load not working due to it using the wrong passphrase.


**0.6.0** (2017-03-26)

* Allow to use multiple stashes on the same backend
Expand Down
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ Options:
-h, --help Show this message and exit.

Commands:
delete Delete a key from the stash
delete Delete a key
export Export all keys to a file
get Retrieve a key from the stash
init Init a stash
list List all keys in the stash If `KEY_NAME` is...
load Load all keys from an exported key file to...
lock Lock a key
migrate Migrate all keys from a source stash to a...
purge Purge the stash from all of its keys
put Insert a key to the stash
ssh Use an ssh type key to connect to a machine...
get Retrieve a key
init Initialize a stash
list List keys
load Load keys from backup
lock Lock a key to protect it
migrate Migrate keys from source to destination stash
purge Purge all keys
put Insert a new key
ssh Use a key to SSH-connect to a machine
unlock Unlock a key


Expand Down Expand Up @@ -303,6 +303,21 @@ An added nicety is that you don't actually have to have key files stored on your

Note that ghost will force you to provide the `conn` and one of `ssh_key` or `ssh_key_path` values when using the `--type=ssh` key type.

You can also use a ProxyCommand based `ssh` method to connect to a machine through a proxy:

```bash
$ ghost put machine-through-proxy --type ssh [email protected] key_file_path=~/.ssh/key.pem [email protected] proxy_key_path=~/.ssh/my_proxy_key

$ ghost ssh my-machine
...

```

You can also use `proxy_key` to provide the string of the key instead of `ssh_key_path`.

Additionally, any string put under the `extend` value in the key will be concatenated to the resulting ssh command.


## Purging a stash

To allow for extreme measures when necessary, ghost provides the `purge` API (and command). If you quickly need to delete all keys from a stash, you can use it. To purge a stash you'll have to provide a mandatory `force` flag as precautionary measure.
Expand Down
13 changes: 7 additions & 6 deletions ghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ def init_stash(stash_path, passphrase, passphrase_size, backend):
'If lost, you will lose access to your stash.')


@main.command(name='put', short_help='Insert a key to the stash')
@main.command(name='put', short_help='Insert a new key')
@click.argument('KEY_NAME')
@click.argument('VALUE', nargs=-1, required=True)
@click.option('-d',
Expand Down Expand Up @@ -1326,7 +1326,7 @@ def unlock_key(key_name,
sys.exit(ex)


@main.command(name='get', short_help='Retrieve a key from the stash')
@main.command(name='get', short_help='Retrieve a key')
@click.argument('KEY_NAME')
@click.argument('VALUE_NAME', required=False)
@click.option('-j',
Expand Down Expand Up @@ -1384,7 +1384,7 @@ def get_key(key_name,
click.echo('\n' + _prettify_dict(key))


@main.command(name='delete', short_help='Delete a key from the stash')
@main.command(name='delete', short_help='Delete a key')
@click.argument('KEY_NAME')
@stash_option
@passphrase_option
Expand Down Expand Up @@ -1465,7 +1465,7 @@ def list_keys(key_name,
click.echo(_prettify_list(keys))


@main.command(name='purge')
@main.command(name='purge', short_help='Purge all keys')
@click.option('-f',
'--force',
required=True,
Expand Down Expand Up @@ -1510,7 +1510,7 @@ def export_keys(output_path, stash, passphrase, backend):
sys.exit(ex)


@main.command(name='load')
@main.command(name='load', short_help='Load keys from backup')
@click.argument('KEY_FILE')
@click.option('--origin-passphrase',
help='The passphrase of the origin stash')
Expand All @@ -1529,7 +1529,8 @@ def load_keys(key_file, origin_passphrase, stash, passphrase, backend):
click.echo('Import complete!')


@main.command(name='migrate')
@main.command(name='migrate',
short_help='Migrate keys from source to destination stash')
@click.argument('SOURCE_STASH_PATH', type=click.STRING)
@click.argument('DESTINATION_STASH_PATH', type=click.STRING)
@click.option('-sp',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def read(*parts):

setup(
name='ghost',
version="0.6.0",
version="0.6.1",
url='https://github.com/nir0s/ghost',
author='nir0s',
author_email='[email protected]',
Expand Down

0 comments on commit a0da024

Please sign in to comment.