Configuring one host key for all the functions in a single function app

Having different keys for different functions is a good practice when you have a handful of functions used by a few applications. However, things might get worse if you have many functions and many client applications leveraging your APIs. Managing the function keys in these large enterprise applications with huge client bases would be painful. To make things simple, you can segregate all related functions into a single function app and configure the authorization for each function app instead of for each individual function. You can configure authorization for a function app using host keys.

HereĀ are the two different types of host keys available:

Create two HTTP trigger apps, as shown in the following screenshot:

Navigate to the Manage tab of both the apps, as shown in the following screenshots. You will notice that both the master key and the host keys are the same in both the apps:

As with the case of function keys, you can also create multiple host keys if your function apps are being used by multiple applications. You can control the access of each of the function apps by different applications using different keys.
You can create multiple host keys by following the same steps that you followed when creating the regular function keys.