Skip to content

Commit 7508dff

Browse files
authored
Merge pull request #104634 from ggailey777/patch-6
Clarify that host==admin keys
2 parents 52ef598 + 032ed20 commit 7508dff

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

articles/azure-functions/functions-bindings-http-webhook-trigger.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -745,22 +745,27 @@ The authenticated user is available via [HTTP Headers](../app-service/app-servic
745745

746746
## Authorization keys
747747

748-
Functions lets you use keys to make it harder to access your HTTP function endpoints during development. A standard HTTP trigger may require such an API key be present in the request.
748+
Functions lets you use keys to make it harder to access your HTTP function endpoints during development. Unless the HTTP authorization level on an HTTP triggered function is set to `anonymous`, requests must include an API key in the request.
749749

750750
> [!IMPORTANT]
751751
> While keys may help obfuscate your HTTP endpoints during development, they are not intended as a way to secure an HTTP trigger in production. To learn more, see [Secure an HTTP endpoint in production](#secure-an-http-endpoint-in-production).
752752
753753
> [!NOTE]
754754
> In the Functions 1.x runtime, webhook providers may use keys to authorize requests in a variety of ways, depending on what the provider supports. This is covered in [Webhooks and keys](#webhooks-and-keys). The Functions runtime in version 2.x and higher does not include built-in support for webhook providers.
755755
756-
There are two types of keys:
756+
#### Authorization scopes (function-level)
757757

758-
* **Host keys**: These keys are shared by all functions within the function app. When used as an API key, these allow access to any function within the function app.
759-
* **Function keys**: These keys apply only to the specific functions under which they are defined. When used as an API key, these only allow access to that function.
758+
There are two authorization scopes for function-level keys:
759+
760+
* **Function**: These keys apply only to the specific functions under which they are defined. When used as an API key, these only allow access to that function.
761+
762+
* **Host**: Keys with a host scope can be used to access all functions within the function app. When used as an API key, these allow access to any function within the function app.
760763

761764
Each key is named for reference, and there is a default key (named "default") at the function and host level. Function keys take precedence over host keys. When two keys are defined with the same name, the function key is always used.
762765

763-
Each function app also has a special **master key**. This key is a host key named `_master`, which provides administrative access to the runtime APIs. This key cannot be revoked. When you set an authorization level of `admin`, requests must use the master key; any other key results in authorization failure.
766+
#### Master key (admin-level)
767+
768+
Each function app also has an admin-level host key named `_master`. In addition to providing host-level access to all functions in the app, the master key also provides administrative access to the runtime REST APIs. This key cannot be revoked. When you set an authorization level of `admin`, requests must use the master key; any other key results in authorization failure.
764769

765770
> [!CAUTION]
766771
> Due to the elevated permissions in your function app granted by the master key, you should not share this key with third parties or distribute it in native client applications. Use caution when choosing the admin authorization level.

0 commit comments

Comments
 (0)