fugue / credstash

A little utility for managing credentials in the cloud
Apache License 2.0
2.06k stars 214 forks source link

`credstash delete` functions properly on large number of secrets #232

Closed askldjd closed 5 years ago

askldjd commented 5 years ago

credstash delete currently does not support paginated response. If there are numerous keys in credstash, some keys may never be scanned properly and be deleted.

This change is copied from the listSecret function that already supports pagination today. The change has been tested against my environment where there are >1500 keys in DynamoDB. The pagination logic correctly scans and deletes the key that it was not able to delete previously.

dbanttari commented 5 years ago

Hi, looks like I just did nearly the same thing in https://github.com/fugue/credstash/pull/240 but also switched to using query which is much more efficient

mike-luminal commented 5 years ago

I merged @dbanttari 's PR, but thank you for your contribution @askldjd