This policy adds a
Authorization header to the upstream request that allows using Azure AD to authenticate requests to your origin server. This is a useful means of securing your origin server so that only your Zuplo gateway can make requests against it.
Using this policy allows you to delegate authentication and authorization to your gateway without writing any code on your origin service. For instructions on how to configure Azure AD authentication see Configure your App Service or Azure Functions app to use Azure AD login.
The configuration shows how to configure the policy in the 'policies.json' document.
name<string> - The name of your policy instance. This is used as a reference in your routes.
policyType<string> - The identifier of the policy. This is used by the Zuplo UI. Value should be
handler.export<string> - The name of the exported type. Value should be
handler.module<string> - The module containing the policy. Value should be
handler.options<object> - The options for this policy. See Policy Options below.
The options for this policy are specified below. All properties are optional unless specifically marked as required.
activeDirectoryTenantId<string> (Required) -Azure Active Directory Tenant ID.
activeDirectoryClientId<string> (Required) -The Application (client) ID of the Azure AD App Registration.
activeDirectoryClientSecret<string> (Required) -The client secret of the Azure AD App Registration.
tokenRetries<number> -The number of times to retry fetching the token in the event of a failure..Defaults to
expirationOffsetSeconds<number> -The number of seconds less than the token expiration to cache the token.Defaults to
Using the Policy
Read more about how policies work