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 the ability to revoke leases on SIGTERM/SIGKILL #176

Open
rocktavious opened this issue Jun 13, 2018 · 2 comments
Open

Add the ability to revoke leases on SIGTERM/SIGKILL #176

rocktavious opened this issue Jun 13, 2018 · 2 comments

Comments

@rocktavious
Copy link

I started this thread - https://groups.google.com/forum/?nomobile=true#!topic/vault-tool/P-4Wf72vDs8

And was directed to make an issue here for further discussion/help.

I've looked over the documentation and i see information here about envconsul and signals - https://github.com/hashicorp/envconsul#signals.

But it would awesome if upon shutdown of the downstream subprocess if envconsul also issued vault revoke lease on all the dynamic credentials and the token it was using before exiting?

The usecase is we have envconsul (in a startup shell script) running as PID 1 inside a docker container being launched on kubernetes, it uses the kubernetes service token to trade for a vault token and then uses envconsul to run the downstream process with the secrets from vault. Most of our engineers are using dynamic secrets from the Database and AWS secret engines, and that means that when kubernetes moves or shuts down the pod the leases are left open polluting vault for the rest of their TTL. (not a terrible thing, but an annoyance)

Since envconsul knows about signals, it would be great if you could configure it to also revoke the leases for things when its cleaning up/shutting down.

Consider this a feature request - but also if we could get some guidance on exactly where to go about implementing this (if possible) we could have engineers on our team look into creating a PR for envconsul for this feature.

Thanks,
Kyle Rockman
Under Armour Connected Fitness

@morganwalker
Copy link

@rocktavious I was wondering if you could have a look at #177. We're trying to implement your use case but it seems envconsul isn't correctly killing the child process prior to spawning the new one. Any help would be appreciated but completely understand how your time could be spent better elsewhere.

Thanks,
Morgan

@jhmartin
Copy link

jhmartin commented Dec 6, 2018

Perhaps this could be generalized, rather than worrying about subprocess restarts -- how about when envconsul is terminating, it first revokes any leases it has acquired, and optionally revokes the vault auth as well (ie revoke-self)?

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

4 participants