Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.46k stars 4.8k forks source link

Get Key and Secret Metadata that is not attached to Certificates #45592

Closed spruhanayak closed 2 months ago

spruhanayak commented 2 months ago

Type of issue

Other (describe below)

Description

How can I retrieve metadata for keys and secrets from Azure Key Vault using the .NET SDK while ensuring that I exclude any keys and secrets associated with certificates? I know that the managed property can indicate whether an item is related to a certificate, but is it reliable to use this property exclusively to filter out such items? https://learn.microsoft.com/en-us/dotnet/api/azure.security.keyvault.keys.keyclient.getpropertiesofkeys?view=azure-dotnet

Page URL

https://learn.microsoft.com/en-us/dotnet/api/azure.security.keyvault.keys.keyproperties.managed?view=azure-dotnet

Content source URL

https://github.com/Azure/azure-docs-sdk-dotnet/blob/master/xml/Azure.Security.KeyVault.Keys/KeyProperties.xml

Document Version Independent Id

5b1997b2-68c9-acb4-2a7d-f05a594c1343

Article author

@azure-sdk

Metadata

github-actions[bot] commented 2 months ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.

heaths commented 2 months ago

Yes, "managed" means it's managed by a certificate. From https://learn.microsoft.com/rest/api/keyvault/secrets/get-secrets/get-secrets?view=rest-keyvault-secrets-7.4&tabs=HTTP#secretitem,

Name Type Description
managed boolean True if the secret's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.
github-actions[bot] commented 2 months ago

Hi @spruhanayak. 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.

spruhanayak commented 2 months ago

/unresolve could manage be set true for any other reasons besides being backed by a cert?

heaths commented 2 months ago

No. The documentation is correct.

Please also note, if you have general questions, you can also ask on https://stackoverflow.com with the tag azure-keyvault.

github-actions[bot] commented 2 months ago

Hi @spruhanayak. 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.

github-actions[bot] commented 2 months ago

Hi @spruhanayak, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.