![](/img/trans.png)
[英]pip install azure-functions in azure pipeline fails with pip authenticate task
[英]Authenticate Azure Functions
我正在使用 HTTP Function 應用程序,我想使用客戶端 ID和function 密鑰(在我的函數內)使用python對其進行身份驗證。
我有當前服務的 API 管理設置,但想在 function 應用程序級別進行身份驗證。
謝謝
對於此解決方法之一,您可以將其授權級別設置為 Function。
注意:確保您在代碼屬性中提供 function 鍵作為 URL 查詢字符串參數(即https://< Your Function App>.azurewebsites.net/api/< Your Function Name>?code=< Your Function Key>
) 。 或者,如果您從 postman 調用 function,您只需添加x-functions-key
header 並為其設置 function 鍵。
您可以從Trigger >> Function Keys中找到所有 function 鍵
但從官方文檔可以看出,在公共應用程序中分發共享密鑰並不是一個好的做法。
如果您的 function 是從公共客戶端調用的,您可能需要考慮實施另一種安全機制
或者,您可以使用 AAD 來驗證您的 Function 應用程序(即,通過應用程序注冊)。 有關更多信息,您可以參考Azure Function 使用 Azure Active Directory 進行身份驗證
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.