创建AzureFunction app我在该应用程序中创建了三个函数。 现在,当我点击任何一个功能时,当我点击一个弹出窗口时,右边会显示Get function URL按钮。 在弹出的对话框中,有一个用于功能Key的下拉按钮和一个用于URL文本框。
在该密钥下拉列表中有三种类型的密钥
默认(功能键) _master(主键) 默认(主机密钥)这三个键有什么区别?
After creating AzureFunction app I created three functions in that app. Now when I click on any of that function I will have Get function URL button on the right side when I click on it one pop up shown up. In that pop up there is one drop-down button for function Key and one Text box for URL.
In that key drop-down there are three type of key
default (Function key) _master (Host key) default (Host key)What is the difference between those three keys?
最满意答案
API密钥可以在两个不同的级别定义:
主机 :通常也称为功能应用程序级别键。 此级别定义的键适用于整个功能应用程序。 您可以在此级别定义功能键,它们将允许客户端对任何功能进行身份验证。 这也是定义主密钥的位置。
功能 :功能级别键适用于它们所定义的特定功能,限制其仅用于对该功能的身份验证。 要启用密钥滚动和消费者特定密钥,您可以在主机和/或功能级别定义多个命名密钥。
API密钥在D:\ home \ data \ Functions \ secrets下的文件系统中,在匹配功能级别密钥的函数名称的文件中,以及为主机级别密钥命名为host.json的文件上被持久加密。
主密钥
主密钥提供对运行时API的管理访问。 如果您选择对您的功能使用管理授权级别,您应该小心,因为我们不建议重新分配主密钥。
https://github.com/Azure/azure-webjobs-sdk-script/wiki/Http-Functions#user-content-api-keys
API keys are may be defined at two distinct levels:
Host: Also commonly referred to as Function App Level keys. Keys defined at this level apply to the entire Function App. You have the ability to define Function Keys at this level, and they would allow clients to authenticate against any function. This is also where your Master Key is defined.
Function: Function level keys apply to the specific functions they're defined under, restricting its use for authentication to that function only. To enable key rolling and consumer specific keys, you can define multiple named keys at the host and/or function levels.
API keys are persisted, encrypted, on the file system under D:\home\data\Functions\secrets, in files matching the function name for function level keys, and a file named host.json for the host level keys.
Master Key
The master key provides administrative access to the runtime APIs. You should exercise care if you choose to use the Admin authorization level for your functions as we do not recommend redistributing the master key.
https://github.com/Azure/azure-webjobs-sdk-script/wiki/Http-Functions#user-content-api-keys
更多推荐
发布评论