Policies
IP Restriction Policy
Custom Policy Example
Zuplo is extensible, so we don't have a built-in policy for IP Restriction, instead we have a template here that shows you how you can use your superpower (code) to achieve your goals. To learn more about custom policies see the documentation.
This custom policy allows you to specify a set of IP addresses that are allowed or blocked from making requests on your API. This can be useful for adding light-weight security to your API in non-critical scenarios. For example, if you want to ensure only employees on your corporate VPN cannot access development environments.
Generally, this policy should not be relied upon as the only security for protecting sensitive workloads.
Configuration
The example below shows how to configure a custom code policy in the 'policies.json' document that utilizes the above example policy code.
Policy Options
The options for this policy are specified below. All properties are optional unless specifically marked as required.
allowedIpAddresses
<string[]> -The IP addresses or CIDR ranges to allowblockedIpAddresses
<string[]> -The IP addresses or CIDR ranges to allow
Using the Policy
Read more about how policies work