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

[Key vault] Encrypt with latest key version if not specified #23866

Open
lzhecheng opened this issue Dec 13, 2024 · 8 comments
Open

[Key vault] Encrypt with latest key version if not specified #23866

lzhecheng opened this issue Dec 13, 2024 · 8 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@lzhecheng
Copy link

Feature Request

Currently in the public doc, key-version is required for encryption. Is it possible that we can get rid of key-version and use the latest key-version when encryption? I found that with the 2016-10-01 api-version, it works.

@lzhecheng lzhecheng changed the title [Key vault] Encrypt with key version [Key vault] Encrypt with latest key version if not specified Dec 13, 2024
@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 13, 2024
@gracewilcox
Copy link
Member

Hi @lzhecheng! I'm assuming you're using our azkeys module. If so, you can just pass in the empty string into the version parameter, and the service will default to using the latest key version.

@gracewilcox gracewilcox added KeyVault issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Dec 13, 2024
Copy link

Hi @lzhecheng. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

@lzhecheng
Copy link
Author

@gracewilcox thank you for the reply! It is very helpful!
I got this question because here it says version is required. So I am confused. Should this doc be updated as well? Thanks!
https://learn.microsoft.com/en-us/rest/api/keyvault/keys/encrypt/encrypt?view=rest-keyvault-keys-7.4&tabs=HTTP#uri-parameters

@lzhecheng
Copy link
Author

I mean when I encrypt() without key version here

@gracewilcox
Copy link
Member

Hi @lzhecheng! The key vault key version is a bit of a special case, so that's why it's not as clearly documented. But if you're using our Client.Encrypt() method and pass in the empty string, the service will use the latest version of the key.

Hope that helps! :)

@lzhecheng
Copy link
Author

@gracewilcox Really appreciate it! The reason I asked about the Public doc is that I will use the api in our service so hope that we can have it officially mentioned in the doc, and this will not change in the future.
Is it possible we can make it? Thanks!

@sandeep-sen sandeep-sen added the Service Attention Workflow: This issue is responsible by Azure service team. label Dec 17, 2024
@github-actions github-actions bot removed the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Dec 17, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jlichwa @RandalliLama @schaabs.

@gracewilcox
Copy link
Member

Hi lzhecheng! Docs are controlled by the service team, so routing you to them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
Status: Untriaged
Development

No branches or pull requests

4 participants