-
Notifications
You must be signed in to change notification settings - Fork 396
Description
Hi all,
This library has been around for around 1.5 years now and in that time, Vault has changed quite a bit. The number of features and API surface has grown a huge amount. Just in the HVAC client class, there's 98 methods, each for a different API call. The problem is that the API is starting to become a bit unwieldy.
I'd like to get some feedback from the users of this library to figure out a better path going forward keep this client simple to use and maintainable as Vault adds more features in the future. I'd like to propose something similar to Consulate's API (a Consul client library/CLI for Python).
We could start by breaking up related functionality into subclasses and then deprecate the old monolithic methods over time, as we get closer to a 1.0 release.
Here's an example of what the new API could look like:
client = hvac.Client()
client.read('mykey')
client.write('mykey', foo='bar')
client.secret_backends.list()
client.secret_backends.enable('mysql')
client.secret_backends.disable('...')
client.token_roles.list()
client.app_roles.list()
client.app_roles.create('test')
client.app_roles.auth()