SlideShare a Scribd company logo
1
February 18, 2023
Mysore MuleSoft Meetup
Part 2 - Handling NFRs of the API through API
Custom Policies
Safe Harbour Statement
● Both the speaker and the host are organizing this meet-up in individual capacity only.
We are not representing our companies here.
● This presentation is strictly for learning purposes only.
● Organizer/Presenter do not hold any responsibility that same solution will work for
your business requirements.
● This presentation is not meant for any promotional activities.
3
A recording of this meetup will be uploaded to events page within 24 hours
Questions can be submitted/asked at any time in the Chat/Questions and Answers Tab
Make it more Interactive!!!
Give us feedback! Rate this meetup session by filling feedback form at the end of the day
We Love Feedbacks!!! Its Bread & Butter for Meetup
Housekeeping
4
Introduction
● About the Organizers
5
Shubham Chaurasia
Billennium India
Pro Integration Developer
A SHOW OF HANDS:
Who is new to this Meetup?
Giridhar Meka
Sr. Technical Architect
linkedin.com/in/giridharmeka
linkedin.com/in/shubhamchaurasia1
6
Vijayaraghavan Venkatadri
Integration Architect
Introduction
● About the Speaker
✔ Working as an Integration Architect at Ernst & Young GDS
✔ 11+ years of experience in Integration and API products in
Solutioning & Design
✔ Spanning across MuleSoft, IBM stack & Cloud technologies
✔ MuleSoft Mentor & Speaker in the MuleSoft Community
✔ 6x certified in IBM & 2x certified in MuleSoft
Agenda
● Introductions
o Summary of Session One (Part 1 - Recap)
■ API’s NFR & Handling NFR
■ API Out of the Box Policies
■ API Policy Enforcement
o Handling NFR using Custom Policy
o Develop, Package, Publish & Manage a Custom Policy
o Use Case : Creating a Custom policy
● Demo
● Q & A
7
• Non-functional requirements define ground rules of how the implementation of the functional
requirements guarded and performed.
○ When it comes to API-First approach design, the NFR defines how the Web API
implementation should perform and react upon the Web API invocation by Web API client.
○ NFRs seeks below segments encapsulated in an API implementation such as performance,
security, compliance, consistency & reliability.
Summary of Session One (Part 1- Recap)
8
API’s Non-Functional Requirements
Handling Non-Functional Requirements
High Performant Runtime
Plane
API Design API Policy
Defines the scalability and
reliability by increasing the
throughput and processing time
of an API
Increases the consistency in delivering the data
and also increase the throughput, prevent data
loss being persistent
API Policy plays vital role in
handling the NFR to define the
security, compliance, Quality of
your service and operations
For example: CloudHub
For example: server-side caching,
asynchronous reliable implementations, etc.,
For example: Out-of-the-Box
policies, custom policies
✔ Compliance
○ Client ID enforcement
○ Cross-Origin Resource Sharing (CORS)
✔ Security
○ HTTP Basic Authentication API policies
■ Basic Authentication - LDAP
■ Basic Authentication - Simple
○ IP-based API Policies
■ IP blocklist
■ IP allowlist
Summary of Session One (Part 1- Recap)
9
Out of the Box (OOTB) API Policies
○ Threat Protection API Policies
■ JSON threat protection
■ XML threat protection
○ OAuth 2.0 access token enforcement API policies
■ OAuth 2.0 access token enforcement using Mule OAuth Provider
■ OpenAM access token enforcement
■ PingFederate access token enforcement
■ OpenId Connect access token enforcement
○ JSON Web Token
✔ Quality of Service - QoS
○ SLA-based API policies
■ Rate Limiting - SLA-based 10
Summary of Session One (Part 1- Recap)
Out of the Box (OOTB) API Policies
○ Non-SLA-based API Policies
■ Rate Limiting
■ Spike Control
■ HTTP Caching
✔ Transformation
○ HTTP header manipulation API policies
■ Header Injection
■ Header Removal
✔ Troubleshooting
○ Message Logging
11
Summary of Session One (Part 1- Recap)
Out of the Box (OOTB) API Policies
12
Summary of Session One (Part 1- Recap)
API Policy Enforcement
Mule Application
Non-Mule Application
(Non-Kubernetes cluster)
Non-Mule Application
(Kubernetes cluster)
On Anypoint Platform, the
embedded Mule runtime
enforce the API policies by
acquiring the API policy
enforcement capability within it
Any non-mule application requires
API proxies which can enable API
policy enforcement. API Proxies are
templated mule applications that
can be auto-generated by Anypoint
API manager. It is deployed to Mule
runtime which is typically called as
API Gateway
Anypoint Service Mesh enables API
policy enforcement which can be
installed by customers into their
customer-hosted Kubernetes
cluster. It builds on Istio, hence it is
required in Kubernetes cluster
before installing Anypoint Service
Mesh.
API policies will be
downloaded in Runtime from
API Manager control plane
using API Auto-discovery
Web API client should invoke API
proxies. Upon enforcing API
policies, the call will be routed to
actual API implementation
Web API clients can invoke Web
API implementation directly in which
Istio/Envoy directly intercept the
invocation and enforce API policy.
✔ Custom policy as the name denotes is a custom-made policy specific to the requirement which
you cannot fulfill through out of the box policies.
✔ These custom policies can developed, published as an asset and apply to the API in the API
Managers.
✔ Ideally a custom policy made of two important configuration files
○ Policy Configuration File: It is a YAML file where the policy parameters and metadata are
defined and subsequently rendered into User Interface field sections.
○ Policy Implementation File: It is a XML file where the actual custom policy logics
implemented and created a deployable JAR file.
Handling Non-Functional Requirements
✔ Custom Policy can accommodate both Functional and Non-Functional requirements. But is
predominantly intended for handling non-functional requirements such as
○ Checking Compliance
○ Additional Authentication
○ Custom Logging, etc..
Custom Policy
13
⮚ http-policy:proxy - The definition of a policy starts with this xml element. This element has an
argument that states the policy name.
⮚ http-policy:source - The element contains the instruction to execute and also can perform pre and
post processing activities before and after the HTTP listener event.
⮚ http-policy:execute - The element requires to execute actual Mule application or other policy.
▪ The instruction before the execute element will execute before executing Mule event processing.
▪ The instruction after the execute element will execute after executing Mule event processing.
Policy Implementation File - XML
14
An API having two custom policies in the order of authentication and logging
Policy Implementation File - XML
15
Execution Order
When an Web API invocation happens, the transaction route will take place in below pattern
★ Authenticate
★ Log-request
★ Flow execution
★ Log-response
✔ Like Mule application, custom policies also can use extension to make use of mule core capabilities.
✔ Example: mule-http-policy-transform-extension - is used to simplifies the modification of HTTP requests
and responses that go through the different policies.
✔ Also, custom code incorporation is allowed by using Mule plugin programmed using java or XML SDK.
Policy Implementation File - XML
16
Using Extension
✔ Applying API policies for the outbound calls i.e. outgoing HTTP calls within Mule application.
✔ http-policy:operation - is used to inject instructions before the Mule processing reaches the HTTP
requester.
Outbound Policies
Error Handling
✔ Mule 4 can handle errors thrown by API policy. Error handling can be done try and error-handler
elements.
✔ Once an error is caught by an error-handler, the error is either, propagated up the Mule Event
processing chain, or handled, where normal Mule event process execution continues
✔ Handlebars are simple templating framework which is required to control the execution of the
instructions within the Custom Policy.
✔ The execution will happen only when the appropriate criterias are selected.
○ It will access configuration values from YAML config file
○ Conditionally decides which section of the policy are applied depending on the selection criteria
○ Supports multiple operators
Policy Implementation File - XML
17
Handlebars
✔ Mule 4 uses this YAML file to store metadata and user parameters.
These parameters rendered in UI.
✔ This flexible design to allows policy to work for multiple API.
Policy Configuration File - YAML
18
Parameters Type
✔ Depending on the type of the parameter, the UI will render,
such as:
○ text boxes
○ radio buttons
○ checkboxes
✔ Mule 4 requires below steps for publishing a full-fledged custom policy
➢ Develop the policy
➢ Package the policy
➢ Upload the resulting policy assets to Exchange
➢ Apply the policy to any API through API Manager
Publishing Custom Policy
19
Develop the policy
✔ The first step to develop a custom policy consists in setting up a project with the required files.
✔ Maven archetype is the easiest way to gather required files in the project
✔ There are four files created and needed for a working policy
➢ pom.xml
➢ mule-artifact.json
➢ custom-policy.yaml
➢ template.xml
Publishing Custom Policy
20
Packaging the policy
✔ Use Maven plugin to package the policy into a deployable jar file.
✔ Use mvn clean package command to package your application
Upload the policy to Exchange
✔ In order to deploy to exchange, update your settings.xml with your exchange credentials or use
connected apps.
✔ Use mvn clean deploy command to deploy to Exchange.
Apply the policy to API via API Manager
✔ In the Anypoint API Manager, you can see the custom Policy is available in the Custom Policy section.
✔ Apply the Custom policy to the API you want.
USE CASE: Creating a Custom Policy
21
✔ A specific use case that an API receives customer creating request in which it has all the
customer information. As part of the customer creation in the backend, custId should be
generated in the response.
✔ Custom Logging Requirement
➢ Custom Message to be logged when the request is received.
➢ Should have option to dynamic plug and play logging in the request and the response.
➢ If the request logging is enabled,
■ Request attributes to be logged
■ Option of enabling/disabling of request attributes should be available.
➢ If the response logging is enabled
■ Response Payload to be logged
■ Option of enabling/disabling of response payload should be available.
POST /customers
Demo
Q&A
Take a stand !
● Nominate yourself for the next meetup speaker and suggest a topic as well.
24
● Share:
○ Tweet using the hashtag #MuleSoftMeetups
○ Join Mysore Group: https://meetups.mulesoft.com/mysore/
● Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
○ Reach out to Mysore Meetup Leaders (Shubham/Giridhar) to suggest topics
for next Meetup
What’s next?
25
Thank you

More Related Content

Similar to Handling NFRs for the API through API policies (Custom Policies) -Part 2 | MuleSoft Mysore Meetup #26

Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10
D.Rajesh Kumar
 
Mule Meetup Calgary- API Governance & Conformance.pdf
Mule Meetup Calgary- API Governance & Conformance.pdfMule Meetup Calgary- API Governance & Conformance.pdf
Mule Meetup Calgary- API Governance & Conformance.pdf
NithaJoseph4
 
12th Manila MuleSoft Meetup May 2022
12th Manila MuleSoft Meetup May 202212th Manila MuleSoft Meetup May 2022
12th Manila MuleSoft Meetup May 2022
Ryan Anthony Andal
 
ASM Course Content.pdf
ASM Course Content.pdfASM Course Content.pdf
ASM Course Content.pdf
viditsir
 
You can't make a (Denver) omelette without breaking eggs: Using OpenStack pol...
You can't make a (Denver) omelette without breaking eggs: Using OpenStack pol...You can't make a (Denver) omelette without breaking eggs: Using OpenStack pol...
You can't make a (Denver) omelette without breaking eggs: Using OpenStack pol...
Brian Rosmaita
 
[Madrid-Meetup Octubre 22] Seguridad fuerte como el vinagre de Jerez. Políti...
[Madrid-Meetup Octubre 22] Seguridad fuerte como el vinagre de Jerez. Políti...[Madrid-Meetup Octubre 22] Seguridad fuerte como el vinagre de Jerez. Políti...
[Madrid-Meetup Octubre 22] Seguridad fuerte como el vinagre de Jerez. Políti...
jorgelebrato
 
Indianapolis mulesoft meetup_sep_11_2021
Indianapolis mulesoft meetup_sep_11_2021Indianapolis mulesoft meetup_sep_11_2021
Indianapolis mulesoft meetup_sep_11_2021
ikram_ahamed
 
Warsaw MuleSoft Meetup #7 - custom policy
Warsaw MuleSoft Meetup #7 - custom policyWarsaw MuleSoft Meetup #7 - custom policy
Warsaw MuleSoft Meetup #7 - custom policy
Patryk Bandurski
 
Customer segmentation and marketing automation with Apache Unomi
Customer segmentation and marketing automation with Apache UnomiCustomer segmentation and marketing automation with Apache Unomi
Customer segmentation and marketing automation with Apache Unomi
Michael Ghen
 
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
Jitendra Bafna
 
BRE Deep Dive
BRE Deep DiveBRE Deep Dive
BRE Deep Dive
BizTalk360
 
Policy Guided Fulfillmentof Murano Applications
Policy Guided Fulfillmentof Murano ApplicationsPolicy Guided Fulfillmentof Murano Applications
Policy Guided Fulfillmentof Murano Applications
rpospisil
 
Singapore MuleSoft Meetup - 24 Aug 2022
Singapore MuleSoft Meetup - 24 Aug 2022Singapore MuleSoft Meetup - 24 Aug 2022
Singapore MuleSoft Meetup - 24 Aug 2022
Royston Lobo
 
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Jitendra Bafna
 
PhillyForce 2018 - Salesforce Platform Keynote
PhillyForce 2018  - Salesforce Platform KeynotePhillyForce 2018  - Salesforce Platform Keynote
PhillyForce 2018 - Salesforce Platform Keynote
andyinthecloud
 
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneMuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
IntegralZone
 
A Vision On Integrated Inspection Planning Prototyping
A Vision On Integrated Inspection Planning PrototypingA Vision On Integrated Inspection Planning Prototyping
A Vision On Integrated Inspection Planning Prototyping
GH_Wijnants
 
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptxMulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Alfonso Martino
 
Microservices & anypoint service mesh calgary mule soft meetup
Microservices & anypoint service mesh   calgary mule soft meetupMicroservices & anypoint service mesh   calgary mule soft meetup
Microservices & anypoint service mesh calgary mule soft meetup
Jimmy Attia
 
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
Jitendra Bafna
 

Similar to Handling NFRs for the API through API policies (Custom Policies) -Part 2 | MuleSoft Mysore Meetup #26 (20)

Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10Bangalore mulesoft meetup#10
Bangalore mulesoft meetup#10
 
Mule Meetup Calgary- API Governance & Conformance.pdf
Mule Meetup Calgary- API Governance & Conformance.pdfMule Meetup Calgary- API Governance & Conformance.pdf
Mule Meetup Calgary- API Governance & Conformance.pdf
 
12th Manila MuleSoft Meetup May 2022
12th Manila MuleSoft Meetup May 202212th Manila MuleSoft Meetup May 2022
12th Manila MuleSoft Meetup May 2022
 
ASM Course Content.pdf
ASM Course Content.pdfASM Course Content.pdf
ASM Course Content.pdf
 
You can't make a (Denver) omelette without breaking eggs: Using OpenStack pol...
You can't make a (Denver) omelette without breaking eggs: Using OpenStack pol...You can't make a (Denver) omelette without breaking eggs: Using OpenStack pol...
You can't make a (Denver) omelette without breaking eggs: Using OpenStack pol...
 
[Madrid-Meetup Octubre 22] Seguridad fuerte como el vinagre de Jerez. Políti...
[Madrid-Meetup Octubre 22] Seguridad fuerte como el vinagre de Jerez. Políti...[Madrid-Meetup Octubre 22] Seguridad fuerte como el vinagre de Jerez. Políti...
[Madrid-Meetup Octubre 22] Seguridad fuerte como el vinagre de Jerez. Políti...
 
Indianapolis mulesoft meetup_sep_11_2021
Indianapolis mulesoft meetup_sep_11_2021Indianapolis mulesoft meetup_sep_11_2021
Indianapolis mulesoft meetup_sep_11_2021
 
Warsaw MuleSoft Meetup #7 - custom policy
Warsaw MuleSoft Meetup #7 - custom policyWarsaw MuleSoft Meetup #7 - custom policy
Warsaw MuleSoft Meetup #7 - custom policy
 
Customer segmentation and marketing automation with Apache Unomi
Customer segmentation and marketing automation with Apache UnomiCustomer segmentation and marketing automation with Apache Unomi
Customer segmentation and marketing automation with Apache Unomi
 
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
MuleSoft Surat Meetup#48 - Anypoint API Governance (RAML, OAS and Async API) ...
 
BRE Deep Dive
BRE Deep DiveBRE Deep Dive
BRE Deep Dive
 
Policy Guided Fulfillmentof Murano Applications
Policy Guided Fulfillmentof Murano ApplicationsPolicy Guided Fulfillmentof Murano Applications
Policy Guided Fulfillmentof Murano Applications
 
Singapore MuleSoft Meetup - 24 Aug 2022
Singapore MuleSoft Meetup - 24 Aug 2022Singapore MuleSoft Meetup - 24 Aug 2022
Singapore MuleSoft Meetup - 24 Aug 2022
 
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
Engineering Student MuleSoft Meetup#3 - API Implementation using APIKIT route...
 
PhillyForce 2018 - Salesforce Platform Keynote
PhillyForce 2018  - Salesforce Platform KeynotePhillyForce 2018  - Salesforce Platform Keynote
PhillyForce 2018 - Salesforce Platform Keynote
 
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral ZoneMuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
MuleSoft Meetup | Reading Meetup Group | Hosted by Integral Zone
 
A Vision On Integrated Inspection Planning Prototyping
A Vision On Integrated Inspection Planning PrototypingA Vision On Integrated Inspection Planning Prototyping
A Vision On Integrated Inspection Planning Prototyping
 
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptxMulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
Mulesoft Meetup Roma - Monitoring Framework & DevOps.pptx
 
Microservices & anypoint service mesh calgary mule soft meetup
Microservices & anypoint service mesh   calgary mule soft meetupMicroservices & anypoint service mesh   calgary mule soft meetup
Microservices & anypoint service mesh calgary mule soft meetup
 
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
MuleSoft Surat Virtual Meetup#16 - Anypoint Deployment Option, API and Operat...
 

More from MysoreMuleSoftMeetup

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
MysoreMuleSoftMeetup
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
 
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
MysoreMuleSoftMeetup
 
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
MysoreMuleSoftMeetup
 
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
MysoreMuleSoftMeetup
 
State Management in Mule applications | MuleSoft Mysore Meetup #42
State Management in Mule applications |  MuleSoft Mysore Meetup #42State Management in Mule applications |  MuleSoft Mysore Meetup #42
State Management in Mule applications | MuleSoft Mysore Meetup #42
MysoreMuleSoftMeetup
 
Anypoint Code Builder (ACB) + AI + Hands-On | MuleSoft Mysore Meetup #41
Anypoint Code Builder (ACB) + AI + Hands-On |  MuleSoft Mysore Meetup #41Anypoint Code Builder (ACB) + AI + Hands-On |  MuleSoft Mysore Meetup #41
Anypoint Code Builder (ACB) + AI + Hands-On | MuleSoft Mysore Meetup #41
MysoreMuleSoftMeetup
 
Transaction Management in Mule 4 | MuleSoft Mysore Meetup #39
Transaction Management in Mule 4 |  MuleSoft Mysore Meetup #39Transaction Management in Mule 4 |  MuleSoft Mysore Meetup #39
Transaction Management in Mule 4 | MuleSoft Mysore Meetup #39
MysoreMuleSoftMeetup
 
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
MysoreMuleSoftMeetup
 
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
MysoreMuleSoftMeetup
 
Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36
MysoreMuleSoftMeetup
 
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
MysoreMuleSoftMeetup
 
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
MysoreMuleSoftMeetup
 
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
MysoreMuleSoftMeetup
 
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
MysoreMuleSoftMeetup
 
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
MysoreMuleSoftMeetup
 
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
MysoreMuleSoftMeetup
 
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
MysoreMuleSoftMeetup
 
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
MysoreMuleSoftMeetup
 

More from MysoreMuleSoftMeetup (20)

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
Exploring Gemini AI and Integration with MuleSoft | MuleSoft Mysore Meetup #45
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore ...
 
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
Munits in Mule 4 [Deep-Dive] | MuleSoft Mysore Meetup #40
 
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
Unlocking Seamless End-to-End Automation with the MuleSoft Automation Suite |...
 
State Management in Mule applications | MuleSoft Mysore Meetup #42
State Management in Mule applications |  MuleSoft Mysore Meetup #42State Management in Mule applications |  MuleSoft Mysore Meetup #42
State Management in Mule applications | MuleSoft Mysore Meetup #42
 
Anypoint Code Builder (ACB) + AI + Hands-On | MuleSoft Mysore Meetup #41
Anypoint Code Builder (ACB) + AI + Hands-On |  MuleSoft Mysore Meetup #41Anypoint Code Builder (ACB) + AI + Hands-On |  MuleSoft Mysore Meetup #41
Anypoint Code Builder (ACB) + AI + Hands-On | MuleSoft Mysore Meetup #41
 
Transaction Management in Mule 4 | MuleSoft Mysore Meetup #39
Transaction Management in Mule 4 |  MuleSoft Mysore Meetup #39Transaction Management in Mule 4 |  MuleSoft Mysore Meetup #39
Transaction Management in Mule 4 | MuleSoft Mysore Meetup #39
 
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
Exploring the realms of MuleSoft RPA | MuleSoft Mysore Meetup #38
 
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
Payment Integration using Braintree Connector | MuleSoft Mysore Meetup #37
 
Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36
 
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
Mastering the Puzzle Integration Patterns Decoded | MuleSoft Mysore Meetup #35
 
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
Discovering Seamless Integration: MuleSoft, AWS and Snowflake | MuleSoft Myso...
 
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
Application Design Thinking wrt Integration Architecture - Part II | MuleSoft...
 
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
HL7 Integration using Mulesoft | MuleSoft Mysore Meetp #32
 
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
Application Design Thinking wrt Integration Architecture - Part I | MuleSoft ...
 
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
 
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
Platform configuration on CloudHub 2.0 | MuleSoft Mysore Meetup #29
 
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
MuleSoft Integration with ChatGPT — Part 1 | MuleSoft Mysore Meetup #27
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 

Handling NFRs for the API through API policies (Custom Policies) -Part 2 | MuleSoft Mysore Meetup #26

  • 1. 1
  • 2. February 18, 2023 Mysore MuleSoft Meetup Part 2 - Handling NFRs of the API through API Custom Policies
  • 3. Safe Harbour Statement ● Both the speaker and the host are organizing this meet-up in individual capacity only. We are not representing our companies here. ● This presentation is strictly for learning purposes only. ● Organizer/Presenter do not hold any responsibility that same solution will work for your business requirements. ● This presentation is not meant for any promotional activities. 3
  • 4. A recording of this meetup will be uploaded to events page within 24 hours Questions can be submitted/asked at any time in the Chat/Questions and Answers Tab Make it more Interactive!!! Give us feedback! Rate this meetup session by filling feedback form at the end of the day We Love Feedbacks!!! Its Bread & Butter for Meetup Housekeeping 4
  • 5. Introduction ● About the Organizers 5 Shubham Chaurasia Billennium India Pro Integration Developer A SHOW OF HANDS: Who is new to this Meetup? Giridhar Meka Sr. Technical Architect linkedin.com/in/giridharmeka linkedin.com/in/shubhamchaurasia1
  • 6. 6 Vijayaraghavan Venkatadri Integration Architect Introduction ● About the Speaker ✔ Working as an Integration Architect at Ernst & Young GDS ✔ 11+ years of experience in Integration and API products in Solutioning & Design ✔ Spanning across MuleSoft, IBM stack & Cloud technologies ✔ MuleSoft Mentor & Speaker in the MuleSoft Community ✔ 6x certified in IBM & 2x certified in MuleSoft
  • 7. Agenda ● Introductions o Summary of Session One (Part 1 - Recap) ■ API’s NFR & Handling NFR ■ API Out of the Box Policies ■ API Policy Enforcement o Handling NFR using Custom Policy o Develop, Package, Publish & Manage a Custom Policy o Use Case : Creating a Custom policy ● Demo ● Q & A 7
  • 8. • Non-functional requirements define ground rules of how the implementation of the functional requirements guarded and performed. ○ When it comes to API-First approach design, the NFR defines how the Web API implementation should perform and react upon the Web API invocation by Web API client. ○ NFRs seeks below segments encapsulated in an API implementation such as performance, security, compliance, consistency & reliability. Summary of Session One (Part 1- Recap) 8 API’s Non-Functional Requirements Handling Non-Functional Requirements High Performant Runtime Plane API Design API Policy Defines the scalability and reliability by increasing the throughput and processing time of an API Increases the consistency in delivering the data and also increase the throughput, prevent data loss being persistent API Policy plays vital role in handling the NFR to define the security, compliance, Quality of your service and operations For example: CloudHub For example: server-side caching, asynchronous reliable implementations, etc., For example: Out-of-the-Box policies, custom policies
  • 9. ✔ Compliance ○ Client ID enforcement ○ Cross-Origin Resource Sharing (CORS) ✔ Security ○ HTTP Basic Authentication API policies ■ Basic Authentication - LDAP ■ Basic Authentication - Simple ○ IP-based API Policies ■ IP blocklist ■ IP allowlist Summary of Session One (Part 1- Recap) 9 Out of the Box (OOTB) API Policies
  • 10. ○ Threat Protection API Policies ■ JSON threat protection ■ XML threat protection ○ OAuth 2.0 access token enforcement API policies ■ OAuth 2.0 access token enforcement using Mule OAuth Provider ■ OpenAM access token enforcement ■ PingFederate access token enforcement ■ OpenId Connect access token enforcement ○ JSON Web Token ✔ Quality of Service - QoS ○ SLA-based API policies ■ Rate Limiting - SLA-based 10 Summary of Session One (Part 1- Recap) Out of the Box (OOTB) API Policies
  • 11. ○ Non-SLA-based API Policies ■ Rate Limiting ■ Spike Control ■ HTTP Caching ✔ Transformation ○ HTTP header manipulation API policies ■ Header Injection ■ Header Removal ✔ Troubleshooting ○ Message Logging 11 Summary of Session One (Part 1- Recap) Out of the Box (OOTB) API Policies
  • 12. 12 Summary of Session One (Part 1- Recap) API Policy Enforcement Mule Application Non-Mule Application (Non-Kubernetes cluster) Non-Mule Application (Kubernetes cluster) On Anypoint Platform, the embedded Mule runtime enforce the API policies by acquiring the API policy enforcement capability within it Any non-mule application requires API proxies which can enable API policy enforcement. API Proxies are templated mule applications that can be auto-generated by Anypoint API manager. It is deployed to Mule runtime which is typically called as API Gateway Anypoint Service Mesh enables API policy enforcement which can be installed by customers into their customer-hosted Kubernetes cluster. It builds on Istio, hence it is required in Kubernetes cluster before installing Anypoint Service Mesh. API policies will be downloaded in Runtime from API Manager control plane using API Auto-discovery Web API client should invoke API proxies. Upon enforcing API policies, the call will be routed to actual API implementation Web API clients can invoke Web API implementation directly in which Istio/Envoy directly intercept the invocation and enforce API policy.
  • 13. ✔ Custom policy as the name denotes is a custom-made policy specific to the requirement which you cannot fulfill through out of the box policies. ✔ These custom policies can developed, published as an asset and apply to the API in the API Managers. ✔ Ideally a custom policy made of two important configuration files ○ Policy Configuration File: It is a YAML file where the policy parameters and metadata are defined and subsequently rendered into User Interface field sections. ○ Policy Implementation File: It is a XML file where the actual custom policy logics implemented and created a deployable JAR file. Handling Non-Functional Requirements ✔ Custom Policy can accommodate both Functional and Non-Functional requirements. But is predominantly intended for handling non-functional requirements such as ○ Checking Compliance ○ Additional Authentication ○ Custom Logging, etc.. Custom Policy 13
  • 14. ⮚ http-policy:proxy - The definition of a policy starts with this xml element. This element has an argument that states the policy name. ⮚ http-policy:source - The element contains the instruction to execute and also can perform pre and post processing activities before and after the HTTP listener event. ⮚ http-policy:execute - The element requires to execute actual Mule application or other policy. ▪ The instruction before the execute element will execute before executing Mule event processing. ▪ The instruction after the execute element will execute after executing Mule event processing. Policy Implementation File - XML 14
  • 15. An API having two custom policies in the order of authentication and logging Policy Implementation File - XML 15 Execution Order When an Web API invocation happens, the transaction route will take place in below pattern ★ Authenticate ★ Log-request ★ Flow execution ★ Log-response
  • 16. ✔ Like Mule application, custom policies also can use extension to make use of mule core capabilities. ✔ Example: mule-http-policy-transform-extension - is used to simplifies the modification of HTTP requests and responses that go through the different policies. ✔ Also, custom code incorporation is allowed by using Mule plugin programmed using java or XML SDK. Policy Implementation File - XML 16 Using Extension ✔ Applying API policies for the outbound calls i.e. outgoing HTTP calls within Mule application. ✔ http-policy:operation - is used to inject instructions before the Mule processing reaches the HTTP requester. Outbound Policies Error Handling ✔ Mule 4 can handle errors thrown by API policy. Error handling can be done try and error-handler elements. ✔ Once an error is caught by an error-handler, the error is either, propagated up the Mule Event processing chain, or handled, where normal Mule event process execution continues
  • 17. ✔ Handlebars are simple templating framework which is required to control the execution of the instructions within the Custom Policy. ✔ The execution will happen only when the appropriate criterias are selected. ○ It will access configuration values from YAML config file ○ Conditionally decides which section of the policy are applied depending on the selection criteria ○ Supports multiple operators Policy Implementation File - XML 17 Handlebars
  • 18. ✔ Mule 4 uses this YAML file to store metadata and user parameters. These parameters rendered in UI. ✔ This flexible design to allows policy to work for multiple API. Policy Configuration File - YAML 18 Parameters Type ✔ Depending on the type of the parameter, the UI will render, such as: ○ text boxes ○ radio buttons ○ checkboxes
  • 19. ✔ Mule 4 requires below steps for publishing a full-fledged custom policy ➢ Develop the policy ➢ Package the policy ➢ Upload the resulting policy assets to Exchange ➢ Apply the policy to any API through API Manager Publishing Custom Policy 19 Develop the policy ✔ The first step to develop a custom policy consists in setting up a project with the required files. ✔ Maven archetype is the easiest way to gather required files in the project ✔ There are four files created and needed for a working policy ➢ pom.xml ➢ mule-artifact.json ➢ custom-policy.yaml ➢ template.xml
  • 20. Publishing Custom Policy 20 Packaging the policy ✔ Use Maven plugin to package the policy into a deployable jar file. ✔ Use mvn clean package command to package your application Upload the policy to Exchange ✔ In order to deploy to exchange, update your settings.xml with your exchange credentials or use connected apps. ✔ Use mvn clean deploy command to deploy to Exchange. Apply the policy to API via API Manager ✔ In the Anypoint API Manager, you can see the custom Policy is available in the Custom Policy section. ✔ Apply the Custom policy to the API you want.
  • 21. USE CASE: Creating a Custom Policy 21 ✔ A specific use case that an API receives customer creating request in which it has all the customer information. As part of the customer creation in the backend, custId should be generated in the response. ✔ Custom Logging Requirement ➢ Custom Message to be logged when the request is received. ➢ Should have option to dynamic plug and play logging in the request and the response. ➢ If the request logging is enabled, ■ Request attributes to be logged ■ Option of enabling/disabling of request attributes should be available. ➢ If the response logging is enabled ■ Response Payload to be logged ■ Option of enabling/disabling of response payload should be available. POST /customers
  • 22. Demo
  • 23. Q&A
  • 24. Take a stand ! ● Nominate yourself for the next meetup speaker and suggest a topic as well. 24
  • 25. ● Share: ○ Tweet using the hashtag #MuleSoftMeetups ○ Join Mysore Group: https://meetups.mulesoft.com/mysore/ ● Feedback: ○ Fill out the survey feedback and suggest topics for upcoming events ○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program ○ Reach out to Mysore Meetup Leaders (Shubham/Giridhar) to suggest topics for next Meetup What’s next? 25