Skip to content

Many versions of one secret in Key Vault #35923

@jasperkpi

Description

@jasperkpi

Is your feature request related to a problem? Please describe.
I'm using Azure Key Vault for API keys that rotate every 10 minutes. It uses an OAuth2 flow, where the access_token is valid for 600 seconds. We safe the new refresh_token that is generated every rotation in the key vault. This means I have secrets with as much as 20.000 versions. When I use the SecretClient.list_properties_of_secret_versions it takes minutes to load all the versions. Is there any way to fix this?

Describe the solution you'd like
How can I prevent having to load so many versions? I try to get the latest 10 versions, not all 20k.

Describe alternatives you've considered
I've considered:

  • Deleting old versions, which seems not to be possible. There's no "retention time" for versions. Only completely soft-delete the secret manually and rewrite as the same name - maybe?
  • Sorting the request, but versions don't come date-sorted on the Get Secret Versions as I've found. They come hexadecimally sorted based on the version id, which is kinda useless?

I don't care there are 20k versions, I'm fine Azure apparently wants to keep them. I just want to view the last 10 or so. How would this be possible? Am I forgetting about an option? Thanks.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.KeyVaultService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions