---
schema_version: "1"
id: bcc18039275d43684be43696c0d6dd0d6021a55b22ec97a756210804a969786d
title: Securing Flex Gateway Instances with Policies
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.12/flex-gateway-secure-apis.md
canonical_url: https://docs.mulesoft.com/gateway/1.12/flex-gateway-secure-apis
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 1c14e69f6d7006012f7f51407f6eefeee147981cb21a062a8b623d5bb3b3af80
description: MuleSoft Documentation Site
release: "1.12"
latest: false
---
---
product: Omni Gateway
version: 1.12
---

# Securing Flex Gateway Instances with Policies

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Policies enforce rules when Flex Gateway processes requests, enabling you to secure and govern your
Flex Gateway API, agent, and tool instances.

MuleSoft provides policies that you can apply to your instances via Anypoint Platform or declarative
configuration files. The provided policies include rate limiting, caching, authentication,
authorization, threat protection, monitoring, and logging. For more information about
MuleSoft-provided policies, see the [Inbound Policies Directory](https://docs.mulesoft.com/gateway/1.12/policies-included-directory) and
[Outbound Policies Directory](https://docs.mulesoft.com/gateway/1.12/policies-outbound-directory).

To extend existing functionality or define new functionality, create custom policies based on your
specific business requirements. For information about creating custom policies, see
[Omni Gateway Policy Development Kit (PDK) Overview](https://docs.mulesoft.com/pdk/latest/policies-pdk-overview).

Automated policies enable your instances to comply with common security and logging requirements by
automatically applying the same set of policies to all instances running in Flex Gateway. See
[Automated Policies](https://docs.mulesoft.com/gateway/1.12/policies-automated-overview) for more information.

To apply a policy for Managed Flex Gateway or Connected Mode, see
[Applying Policies for Managed Flex Gateways and Connected Mode](https://docs.mulesoft.com/gateway/1.12/flex-gateway-secure-conn).

To apply a policy in Local Mode, see [Applying Policies in Local Mode](https://docs.mulesoft.com/gateway/1.12/flex-gateway-secure-local).

For information about policy reordering, see [Ordering Policies](https://docs.mulesoft.com/gateway/1.12/policies-reorder).

For information about DataWeave support, see
[DataWeave Support in Flex Gateway Policies](https://docs.mulesoft.com/gateway/1.12/policies-flex-dataweave-support).

## See Also

- [Flex Gateway Overview](https://docs.mulesoft.com/gateway/1.12/)

- [Getting Started with Flex Gateway](https://docs.mulesoft.com/gateway/1.12/flex-gateway-getting-started-overview)
