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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • MuleSoft Integration With RabbitMQ
  • MDC Logging With MuleSoft Runtime 4.4
  • How To Use JMS ActiveMQ With Mule 4 - Part 6
  • How to Use Mulesoft VM Connector

Trending

  • The Three Tiers of Agentic Incident Response: When to Trust AI Autonomy
  • Designing Frontend Applications for Failure, Not Just Success
  • RAG Architecture Patterns: Proxy, Caching, and Routing
  • The Permission Was Valid. The Action Was Not Authorized.

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. MuleSoft APIkit Router - QueryParam and Header Strict Validation Configuration

MuleSoft APIkit Router - QueryParam and Header Strict Validation Configuration

By 
Sravan Lingam
·
Mar. 24, 21 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
12.1K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

Hello Muleys,

Here's another interesting article on how to restrict additional queryParams and headers that are sent other than those defined in RAML. 

We all do the test if the required parameters are working fine or not but we forget to test if unnecessary parameters sent along with required parameters. 

What happens if unwanted parameters are sent?

There are chances that attackers might send some thousands of queryParams and Headers with large content. In that case, your application will crash. So what to do?

Here's the solution:

I have designed a basic RAML with the below resource :

When you download the RAML and generate flows,

There's an option to restrict additional parameters or headers in APIkit Router Module configuration :

By default the configuration is disabled. You have to enable the strict validation config as below:

Now your application will not be allowed to pass additional fields:

Removing unnecessary fields will give a successful response:

Check out this video for the live demo:


MuleSoft application Testing Pass (software) Download Flow (web browser) Crash (computing)

Opinions expressed by DZone contributors are their own.

Related

  • MuleSoft Integration With RabbitMQ
  • MDC Logging With MuleSoft Runtime 4.4
  • How To Use JMS ActiveMQ With Mule 4 - Part 6
  • How to Use Mulesoft VM Connector

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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