Implementing API security using policy
We have learned about policies, types of policies, and categories of policies. Now, let’s understand how to achieve security by applying a policy.
In this walkthrough, we shall apply a simple basic authentication policy:
- Import any Mule application into Anypoint Studio or use your pre-existing Mule application.
- Log in to the Anypoint Platform. Go to API Manager | API Administration | Add new API (as shown in Figure 10.4).
Figure 10.4 – Adding a new API instance on API Manager
- In order to add a new API, we’ll first configure Runtime (see Figure 10.5). Select Mule Gateway as the runtime, as we’re connecting to a pre-existing application. You can also connect to a new Mule application as a proxy.
- Select Mule 4 as the Mule version. Click Next.
Figure 10.5 – Configuring runtime while adding the API instance
- We will now configure...