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

Keys mangement endpoints are not documented or exposed via Azure SDK for .NET consistently #37862

Closed
thegrahamking opened this issue Jul 20, 2023 · 4 comments
Assignees
Labels
App Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@thegrahamking
Copy link

The create/update and delete host/functions or system key endpoints added to resolve Azure/azure-functions-host#3994 are not documented in Azure REST API reference (https://learn.microsoft.com/en-us/rest/api/azure/) or exposed via the Azure SDK for .NET (https://learn.microsoft.com/en-us/dotnet/api/overview/azure/?view=azure-dotnet), and I suspect other languages too but haven't verified this.

PUT api/sites/{name}[/slots/{slot}]/host/default/{functionkeys|systemkeys}/{keyName}
DELETE api/sites/{name}[/slots/{slot}]/host/default/{functionkeys|systemkeys}/{keyName}

The current version of the SDK Azure.ResourceManager.AppService does not expose the HttpClient it uses and so it's not possible (without creating another HttpClient instance) to make requests to these endpoints.

There is inconsistency across other key management endpoints too:

The list host keys endpoint is documented and exposed via the Azure SDK for .NET
POST /host/default/listkeys
https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/list-host-keys
https://learn.microsoft.com/en-us/dotnet/api/azure.resourcemanager.appservice.websiteresource.gethostkeysasync?view=azure-dotnet

The list function key endpoint is documented and exposed via the Azure SDK for .NET
POST /functions/{functionName}/listkeys
https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/list-function-keys
https://learn.microsoft.com/en-us/dotnet/api/azure.resourcemanager.appservice.sitefunctionresource.getfunctionkeysasync?view=azure-dotnet#azure-resourcemanager-appservice-sitefunctionresource-getfunctionkeysasync(system-threading-cancellationtoken)

The create/update and delete function key endpoint is not document but is exposed via the Azure SDK for .NET
PUT /functions/{functionName}/keys/{keyName}
https://learn.microsoft.com/en-us/dotnet/api/azure.resourcemanager.appservice.sitefunctionresource.createorupdatefunctionsecretasync?view=azure-dotnet#azure-resourcemanager-appservice-sitefunctionresource-createorupdatefunctionsecretasync(system-string-azure-resourcemanager-appservice-models-webappkeyinfo-system-threading-cancellationtoken)
https://learn.microsoft.com/en-us/dotnet/api/azure.resourcemanager.appservice.sitefunctionresource.deletefunctionsecretasync?view=azure-dotnet

@brettsam brettsam transferred this issue from Azure/azure-functions-host Jul 26, 2023
@github-actions github-actions bot added App Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 26, 2023
@jsquire jsquire added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-team-triage Workflow: This issue needs the team to triage. labels Jul 27, 2023
@jsquire
Copy link
Member

jsquire commented Jul 27, 2023

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

@HarveyLink HarveyLink added this to the 2024-02 milestone Jan 10, 2024
@HarveyLink
Copy link
Member

Hi, @thegrahamking , Thank you for using Azure SDK for .NET.
The APIs you mentioned has been updated into the REST APIs, as well as our SDK.
But the content has some changes when applying, please check:
Azure/azure-rest-api-specs#7174
Azure/azure-rest-api-specs#17653

@thegrahamking
Copy link
Author

Hi @HarveyLink, with the age, length and depth of the issues you've linked to I'm struggling to see what you mean by "the content has some changes when applying", could you outline please?

I also can't see this change in the Azure SDK for .NET. Could you point me to the relevant classes/methods in the docs please?

@HarveyLink
Copy link
Member

Hi @HarveyLink Minghao Chen (WICRESOFT NORTH AMERICA LTD) Vendor, with the age, length and depth of the issues you've linked to I'm struggling to see what you mean by "the content has some changes when applying", could you outline please?

I also can't see this change in the Azure SDK for .NET. Could you point me to the relevant classes/methods in the docs please?

PUT api/sites/{name}[/slots/{slot}]/host/default/{functionkeys|systemkeys}/{keyName}
DELETE api/sites/{name}[/slots/{slot}]/host/default/{functionkeys|systemkeys}/{keyName}
Applied as:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName} with PUT and DELETE
SDK PUT operation , DELETE operation


The create/update and delete function key endpoint is document at
https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/create-or-update-function-secret?view=rest-appservice-2022-03-01&viewFallbackFrom=rest-appservice-2021-02-01

@github-actions github-actions bot locked and limited conversation to collaborators May 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
App Services customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants