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

Feature/ttl support #170

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

wzedi
Copy link

@wzedi wzedi commented Oct 4, 2017

Add support for expiring secrets using Dynamo DB TTL. Changes include:

  1. credstash setup - enable TTL on the DD table adding a 'ttl' attribute
  2. credstash put - add a '-e' flag for an expiry period in seconds
  3. updated readme to document new feature

We use this feature to store SSL certs that expire in 24 hours. Rather than creating a new process in our application to track these records and remove them manually we rely on DD TTL to automatically remove the records when they are no longer required.

Warrick Zedi added 3 commits October 4, 2017 11:57
…l' attribute and to accept -e flag for 'put' action. Updated requirements.txt to use latest version of boto3 and updated readme for expiry flag.
@wayne-luminal
Copy link
Contributor

Thanks for the awesome work @wzedi. Sorry to leave you hanging for a while. I'm going through the PRs now. I'm planning to pull this in to the next major version of credstash that I'm working on now. One thing I'll note is I don't think DDB TTL is supported in us-gov-west-1. I don't know if anyone is using credstash there or not. My guess is in that region the call will fail. If you have time, would you add a protection around making the call to update_time_to_live() here. If you don't have time it's ok I'll take it up as part of the refactor and integration I'm working on for 2.0.

@wzedi
Copy link
Author

wzedi commented Oct 26, 2017 via email

@wzedi
Copy link
Author

wzedi commented Oct 29, 2017

Updated to handle any AWS exception during ttl enablement and to present warning message. Table creation will complete and credstash can be used without ttl enablement.

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