03 ° Service 03 / MuleSoft · API Management & Security

MuleSoft API Manager.
Policies that protect APIs.

We set up Anypoint API Manager and secure your MuleSoft APIs with policies for OAuth 2.0, JWT, and rate limiting, tailored to each API. For a lottery company, we built the Anypoint Platform so that the policies were in place before the first API needed them.

Tagline API Manager · Policies · OAuth 2.0 · JWT · Omni Gateway
° dl / service-03
° Regulations and standards that touch API security
As of November 2026
NIS2
Policies for access control and cryptography (Art. 21)
GDPR
Technical and organizational measures (Art. 32)
ISO/IEC 27001
Requirements for an information security management system
OWASP API
Top 10 API security risks, 2023 edition
PSD2
Strong customer authentication and secure communication
RFC 9700
Best current practice for OAuth 2.0 security
° Overview · Anypoint API Manager

What MuleSoft API Manager does and how policies work.

Anypoint API Manager is the part of the Anypoint Platform that you use to manage, govern, and secure APIs. Rules are created there as policies and apply to the API without any change to the application code. We set it up and select the policies that fit your APIs.

API Manager maintains every API as an instance in an environment. Policies are applied to this instance, the contracts with the applications that are allowed to use it are created there, and the usage data comes together there. The implementation remains separate, so a rule can be changed or added without redeploying the application. API Manager manages the rules, and a gateway applies them by checking every request before it reaches the API.

API Manager in Mule 4 and how the runtime enforces policies

For this purpose, the Mule gateway is embedded in the Mule runtime. Through API autodiscovery, a Mule 4 application connects to its instance in API Manager, downloads the assigned policies, and supplies data for analytics. The prerequisite is a flow with an HTTP Listener. For APIs and services outside the Mule runtime, Omni Gateway (formerly Flex Gateway) takes on the same task. In Connected Mode, it is also configured from API Manager.

Policies in Mule 4 and what is included

MuleSoft ships ready-made policies that can be configured in API Manager and assigned to an instance. When it comes to securing APIs (API security), six tasks take priority. For each one, we list the policies by their name from the documentation.

  1. Identify applications · Client ID Enforcement, access only with a contract
  2. Validate tokens · JWT Validation and OpenID Connect OAuth 2.0 Access Token Enforcement
  3. Set quotas · Rate Limiting and Rate Limiting SLA-based
  4. Protect back ends · Spike Control queues requests during load peaks
  5. Limit payloads · JSON Threat Protection and XML Threat Protection
  6. Restrict access · IP Allowlist and IP Blocklist
A policy is attached to the API instance. That way a rule can be changed without touching the application.

Ordering policies and prescribing them for all APIs

You define the order of an API's policies in API Manager. The documentation names two exceptions. The CORS policy always runs first, and automated policies run before the policies of the individual API. Automated policies are the means for rules that should apply across an entire environment. They are configured once and take effect for the APIs of that environment, provided their runtime version is covered.

During setup, we record which policy applies to which API, in which order, and with which values. The audit log of the Anypoint Platform shows who applies, changes, or removes a policy. On request, we review an existing configuration and hand over findings with problem, cause, and next step. This is the form in which we handed over the findings of a platform audit for a food manufacturer in 2019.


° Guidance

MuleSoft API security and which measure fits which API

Six use cases, ten protective measures. The matrix shows our assessment of how well a measure fits the respective API. It is meant as a recommendation.

Protective measurePublic APIPartner APIMobile appWeb portalProcess APISystem API
Client ID Enforcement~
OAuth 2.0 or JWT Validation~~~
Basic Authentication~~~
mTLS via the TLS context~~
Rate Limiting SLA-based~~~
Rate Limiting~~~~~
Spike Control~~
JSON / XML Threat Protection~~
IP Allowlist~~~
CORS~
Strong fit With limitations Not recommended
° Platform · Building blocks

What we set up and secure.

Six building blocks of the Anypoint Platform that we set up for API security.

°01 · Policies
Policies
Selection, order, and values per API. Where the standard is not enough, a custom policy is created.
Client ID Enforcement · Rate Limiting · Spike Control · Threat Protection
°02 · OAuth 2.0

OAuth 2.0 with your identity provider

Policies in API Manager validate the access tokens of your identity provider. As client providers, MuleSoft lists Okta, OpenAM, PingFederate, and Microsoft Entra ID, among others.

°03 · JWT
JWT
The JWT Validation policy checks the signature of a JSON Web Token and claims such as expiration and audience. The keys come from a JWKS URL, for example.
°04 · Omni Gateway

Omni Gateway, formerly Flex Gateway

The Envoy-based gateway also protects APIs outside the Mule runtime. It runs as a Linux service, in a container, or on Kubernetes, and validates the client certificates for mTLS.

°05 · Catalog

Anypoint Exchange as a catalog

Applications request their access in Exchange. For a lottery company, we set it up as a catalog in which APIs are documented and discoverable.

°06 · Governance
API Governance
Rulesets check API specifications for conformance,
also as a step in the pipeline
Anypoint API Best Practices · OpenAPI Best Practices · custom rulesets
° From our projects
2016-2017
Anypoint set up,
policies before the first API
OAuth 2
Customer account via SSO
for apps and web shop
20+
service providers, the same
architecture guidelines
° Deep dive · Governance and access
As of 2026  ·  2 min read

MuleSoft governance and OAuth 2.0 with rules for all APIs and access for apps.

Individual policies protect individual APIs. Two questions go beyond that. The first is how rules apply to all APIs and everyone involved, and the second is how apps and portals securely access APIs on behalf of signed-in users. We answer both with the tools of the platform and with experience from projects for an energy utility and a lottery company.

01

MuleSoft governance with rules that apply to all APIs

Anypoint API Governance checks APIs against rulesets. A governance profile applies selected rulesets to a filtered group of APIs and shows which of them are conformant. MuleSoft provides rulesets in Exchange, including Anypoint API Best Practices, OpenAPI Best Practices, and Authentication Security Best Practices, and you can add your own rulesets. Through the Anypoint CLI, the same check runs in the pipeline. API Governance validates at this point. Enforcement happens at runtime through the policies at the gateway, and for an entire environment through automated policies.

Rules need someone who defines and reviews them. At an energy utility, we are responsible for the solution architecture of a program with more than 20 service providers. There, the architecture guidelines apply to everyone, and design reviews check every integration against them. Every change takes the same verified path into the environments through the GitLab pipelines. For a lottery company, building the platform also included defining the requirements management for APIs and the acceptance criteria that determine when an API is done.

  • °
    Governance profiles   Selected rulesets apply to a filtered group of APIs, with a visible conformance status.
  • °
    Validation in the pipeline   The Anypoint CLI validates an API specification against rulesets before it is published.
  • °
    Automated policies   Policies for the APIs of an entire environment, configured once instead of per instance.
  • °
    Design reviews   Architecture guidelines are checked per integration, as in the program for an energy utility.
02

OAuth 2.0 in MuleSoft for access by apps and portals

Apps and portals call APIs on behalf of signed-in users. The proof is an access token that the identity provider issues and the gateway validates before the request reaches the API. To do this, the OpenID Connect policy sends the token to the provider's validation endpoint, and API Manager takes the address from the client provider configuration. Alternatively, the JWT Validation policy checks signature and claims directly at the gateway. The policies validate tokens, issuing them stays with the identity provider, and the API itself stays free of sign-in logic.

For a lottery company, we brought tickets, drawings, and the customer account into the apps for Apple and Android and into the web shop. The APIs are secured with OAuth 2, and the SSO provider is connected for account management. A customer signs in once and then reaches tickets, drawings, and the account through the app and the web shop. The project was presented as a success story at the MuleSoft Summit. Our articles on OAuth 2.0, JSON Web Token, and single sign-on explain the fundamentals.

  • °
    Token validation at the gateway   Access tokens are validated before a request reaches the API.
  • °
    Client provider   The existing identity provider is set up as a client provider in the Anypoint Platform.
  • °
    JWT Validation   Signature, expiration, and audience of a JSON Web Token are checked directly at the gateway.
  • °
    Single sign-on   One sign-in for app and web shop, implemented in the project for a lottery company.
° Frequently asked questions about MuleSoft API Manager

What you are asking about API Manager right now.

01 What is MuleSoft API Manager?

The component of the Anypoint Platform used to manage, govern, and secure APIs. Anypoint API Manager maintains API instances per environment, assigns policies to them, and manages the contracts with the applications that are allowed to use an API. The implementation code remains unchanged.

02 How does the Mule runtime enforce policies and limit access to APIs?

With the Mule gateway, which is embedded in the Mule runtime. Through API autodiscovery, a Mule application connects to API Manager, downloads the assigned policies, and applies them to incoming requests. Access is then limited by policies such as Client ID Enforcement, Rate Limiting, or token validation.

03 When do you need a custom policy in Mule 4, and how is it created?

When the included policies do not cover a requirement, for example a proprietary header format. In Mule 4, a custom policy is developed as a separate project, published to Anypoint Exchange, and assigned in API Manager like any other policy. For Omni Gateway, it is built with the Policy Development Kit in Rust and runs as WebAssembly.

04 What is MuleSoft Omni Gateway, and how does it relate to Flex Gateway?

Omni Gateway is the current name of Flex Gateway. It is a lightweight API gateway based on Envoy that protects Mule APIs as well as APIs outside the Mule runtime. It runs as a Linux service, in a container, on Kubernetes, or on OpenShift. In Connected Mode, it is controlled from API Manager, and in Local Mode through declarative configuration files.

05 How does MuleSoft validate a JWT?

With the JWT Validation policy. It checks the signature of a JSON Web Token in JWS format and the claims for expiration, not-before time, and audience. Further claims can be checked with DataWeave expressions. The policy obtains the keys through a JWKS URL, for example. Our article JSON Web Token (JWT) explains how a JWT is structured.

06 Who sets up MuleSoft API Manager and reviews the policies?

This is our service for MuleSoft API security. We set up Anypoint API Manager, select the policies that fit your APIs, and record which policy applies to which API, in which order, and with which values. On request, we review an existing configuration and hand over findings with problem, cause, and next step. For a lottery company, we built the Anypoint Platform so that the policies were in place before the first API needed them.

API Management & Security

Let's talk about the security of your MuleSoft APIs.

The initial call with an engineer covers your starting point, your open questions, and a sensible next step.

01 Submit a request
* Required field
Topic
Encrypted transmission · TLS 1.3