DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Why Mocking Sucks
  • How to Enhance the Performance of .NET Core Applications for Large Responses
  • Automatic 1111: Adding Custom APIs
  • Create Proxy Application for Mule APIs

Trending

  • From AI Chaos to Control: Building Enterprise-Grade LLM Gateways With MuleSoft Anypoint
  • Building a DevOps-Ready Internal Developer Platform: A Hands-On Guide to Golden Paths, Self-Service, and Automated Delivery Pipelines
  • Migrate a Hardcoded LangGraph Agent to LaunchDarkly AI Configs in 20 Minutes
  • Why DDoS Protection Is an Architectural Decision for Developers
  1. DZone
  2. Data Engineering
  3. Databases
  4. Mule4 Automated Policy

Mule4 Automated Policy

Automated policies enable the Anypoint Platform instance to automatically apply the same set of policies to all APIs running in a single environment.

By 
Mukesh Thakur user avatar
Mukesh Thakur
·
Feb. 04, 21 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
8.1K Views

Join the DZone community and get the full member experience.

Join For Free

Types of Mulesoft Policy


Types of Mulesoft Policy

Support for Automated Policies

  • Automated policies are only available for Mule runtime engine (Mule4) APIs using a MuleSoft-hosted control plane.
  • All runtime deployment targets support automated policies (CloudHub, Runtime Fabric, and Hybrid).
  • Automated policies have priority over the same types of policies already applied to a specific API proxy.
  • As an administrator, we can apply policies specific to external identity providers (IdPs, such as OpenID) if the environment to which you want to apply policies includes them.

Steps to Apply Automated Policy

  • In the API Manager, select Automated Policies from the navigation menu on the left.
  • Click Apply new automated policy.
  • Select the provided policy that you want to configure.
  • Apply to a specific set of runtimes.
  • Click Apply.

Select Exchange Policy screenshot

Apply Basic authentication screenshot

There are three different ways to manage an API:

  1.  API by API from Exchange, 
  2. Create new API,
  3.  Import RAML. 

Most of the time we create from exchange for quick demonstration creating a new HTTP API.

API Administration, Create new API

Provide Name, Asset Type and click on Continue finally click on Save as below

Creating an asset UI

Select Managing type, Application type, check Mule version, and Save.

Endpoint configuration UI

After save you can see API instance has been created. Copy ID to use in the implementation. It establishes a relationship between API created in API Manager and API deployed in Runtime Manager.

auto-policy-demo

Simple Implementation flow to demonstrate automated policy and show the use of API Id created in previous steps.

policy-demo1Flow

As you can see basic authentication has been applied on deployed applications. It asks for credentials while accessing the API. 

Credential UI

The basic authentication policy will be applied automatically for any new application deployed on the runtime manager.

A conflict occurs when adding an automated policy that it is already applied as an API Level policies:

  • Automated policies have higher priority over API level policies.
  • A popup with the list of conflicting APIs will be displayed.
  • We can either select the APIs from the list of already configured APIs and manually disable or remove the conflicting policy or choose to override all conflicting policies for the already configured APIs.
  • The API policy will be re-enabled automatically if an Automated Policy is removed.

When managing new APIs, in the Policies tab, you can see information regarding the status of automated policies applied to your environment:

  • Automated policies are not shown until the application is in Active Status.
  • A list of applied automated policies will be listed in the Policies tab of the API after the application is deployed.
  • Users with View Policies role for the environment will be able to see the list of automated policies applied.
  • A notification will be sent to the organization, and environment administrators if an application is deployed to an environment that has an automated policy that doesn’t cover the deployed runtime.
API application

Opinions expressed by DZone contributors are their own.

Related

  • Why Mocking Sucks
  • How to Enhance the Performance of .NET Core Applications for Large Responses
  • Automatic 1111: Adding Custom APIs
  • Create Proxy Application for Mule APIs

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook