Uncover the Flex Gateway with a Demonstration (1).pdf
1. Saturday, 20 May , 2023
Faridabad MuleSoft Meetup Group
Uncover the Flex Gateway with a
Demonstration
2. 1. Introduction
2. Universal API Management
3. Why are API gateways important?
4. What does a secure API gateway do for your systems?
5. Anypoint Platform Gateways Different Runtime Options
6. Introduction to Flex Gateway
7. Benefits of Flex Gateway
8. Modes of Flex Gateway
9. Demo
10. Q/A
2
Agenda
3. 3
● About the organizer:
○ Amit Singh
○ Pankaj Goyal
○ Rohit Singh
○ Mitali Chaudhary
Introductions
A SHOW OF HANDS:
Who is new to this Meetup?
4. 4
Speakers for the session
A SHOW OF HANDS:
Who is new to this Meetup?
Anjali Kushwaha Leena Chauhan
5. Safe Harbor Statement
● Both Speaker and Organizers are here with their own capacity and not representing any
organization/company.
● Speaker is only sharing his/her knowledge and is not responsible if the same product does not
work for your company.
● Please make all the design decision by understanding what is available in current
product(MuleSoft).
● We all are here to learn together “The moto is to learn together”
5
6. 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 & 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
6
7. Universal API Management
Universal API Management allows you to manage, govern or secure the APIs within single control
panel.
With Universal API management, enterprises will be able to work with APIs of any origin, in any
architecture or environment while engaging their internal and external API ecosystems.It doesn't
matter whether they are Mulesoft or Non-Mulesoft APIs or it located anywhere( on-premises, cloud
or anywhere).
With universal API management, enterprises can:-
7
Work with APIs of
any origin
Work in any
architecture
Work in any
environment
Engage any
audience
8. Why are API gateways important?
● API gateways control access to APIs to protect them, reduce API abuse, and increase their
value. Additionally, an API gateway add an insulation layer between providers and
consumers of APIs. At a high level, an API gateway:
○ Authorizes and authenticates: Ensures secure access to APIs and who (authorize) can call APIs
○ Controls traffic: Throttling API traffic to avoid denial of service attacks — for example, order
status API can be called a maximum of 10 times in a minute
○ Adds telemetry and analytics: Understands how APIs are being used across traffic and usage
patterns
● API gateways can also help and enable additional capabilities, such as:
○ API alerts: Traffic and policy alerts for more efficient API monitoring and health
○ Efficient API development: Run multiple versions of APIs allowing customers to iterate, test, and
release new versions quickly and protocol conversion to support multiple clients with single API
8
9. What does a secure API gateway do for your
systems?
The best API gateways are designed from the ground up to provide robust security. An API
gateway typically performs the following functions:
● Serving as an inline proxy point of control over APIs
● Verifying the identity associated with API requests through credential and token validation and
other authentication means
● Determining which traffic is authorized to pass through the API to backend services
● Metering the traffic flowing through the APIs using rate limiting and throttling
● Logging all transactions and applying runtime policies to enforce governance
● Providing last-mile security to the backend services that power the APIs
9
10. Anypoint Platform offers these runtime options available for Anypoint Platform Gateways s for managing
and securing your APIs and provide flexibility and scalability to meet the needs of different organizations
1. Anypoint Mule Gateway
2. Anypoint Service Mesh
3. Anypoint Flex Gateway
Anypoint Platform Gateways Different Runtime
Options
10
11. 1. Anypoint Mule Gateway
Mule Runtime includes an embedded Mule Gateway. Using this gateway, any user can, for
example, apply a basic authentication policy on top of a Mule application, enrich an
incoming/outgoing message, or add any other complex capability to an API without having to write
any code.
11
12. 2. Anypoint Service Mesh
12
Anypoint Service Mesh is a MuleSoft solution that provides discoverability, management, and
security for any non-MuleSoft service deployed to Kubernetes into Anypoint Platform.
Some of the key features include service discovery, traffic management, security, and
observability.
Service discovery allows you to automatically discover and register your microservices within the
mesh. Traffic management enables you to control the flow of traffic between your microservices,
ensuring that each service receives the appropriate amount of traffic. Security features include
mutual TLS authentication and access control policies. Observability tools provide real-time
insights into the performance and health of your microservices.
.
13. 3. Anypoint Flex Gateway
● Flex Gateway is a key component of
Universal API Management that
provides a secure and scalable way to
manage APIs.
● It acts as a gateway between clients and
servers, allowing businesses to control
access to their APIs and enforce security
policies.
● Anypoint Flex Gateway is MuleSoft’s
gateway which Control and secure APIs
running anywhere with ultrafast
response times they designed to
manage and secure APIs running
anywhere.
13
15. What are the Benefits of Flex Gateway ?
15
● Flex gateway is an ultra-fast gateway that can be used for any APIs (MuleSoft or Non-MuleSoft
APIs), deployed anywhere (Cloud, Docker, Kubernetes, Customer Hosted, etc.).
● Easily manage all the APIs within your organization from a single platform and under a single
umbrella.
● Flex Gateway also supports dynamic routing, which allows businesses to route API requests based
on various criteria such as URL, header, or payload. This helps businesses optimize their API
performance and ensure high availability.
● With Flex Gateway, businesses can easily create custom connectors to integrate their legacy
systems with cloud applications. It also offers advanced security features such as SSL/TLS
encryption and OAuth authentication to ensure data privacy and protection.
● Adapt any architecture with a lightweight and flexible API Gateway to manage and secure the APIs.
.
16. Key feature of Flex Gateway ?
16
1. Security:
Flex Gateway provides various security features such as OAuth2, JWT token validation, IP
whitelisting, and more. These features help businesses protect their APIs from unauthorized
access and ensure data privacy..
2. Governance:
Flex Gateway enables you to govern your APIs by providing features such as rate limiting,
throttling, and analytics. This ensures that your APIs are used efficiently and effectively.
3. Scalability:
Flex Gateway is highly scalable and can handle large amounts of API traffic. It can be
deployed on-premises or in the cloud, depending on your needs.
4. Customization:
Flex Gateway allows you to customize your APIs by adding policies. This enables you to tailor
your APIs to your specific needs.
17. Real-World Use Cases for Flex Gateway
Flex Gateway has been used by businesses across
various industries to address their integration challenges.
For example, a healthcare provider may use Flex
Gateway to integrate their electronic health records
system with a cloud-based patient portal to provide
real-time access to medical records for patients.
Similarly, a financial institution may use Flex Gateway to
integrate their legacy payment systems with a modern
mobile banking application to offer customers a seamless
payment experience. The possibilities are endless with
Flex Gateway.
17
18. Flex Gateway - Modes
18
There are two modes:
1. Connected Mode:
- It creates a secure connection between the Flex Gateway and MuleSoft's Anypoint
Platform.
- The Flex Gateway can securely exchange data with Anypoint Platform and its
connected applications.
2. Local Mode:
- It allows us to deploy and run the Flex Gateway on-premises, without requiring a
connection to Anypoint Platform.
- This mode enables us to manage and control the data exchange process entirely
within your organization's infrastructure.
20. Deciding Factor b/w Connected Mode and
Local Mode
1. Security Requirements: Organization has strict security that prevent traffic from
leaving the internal network.
2. Low Latency Requirements: Minimize the time it takes for requests to reach the
internal systems.
3. Compliance Requirements: If there is specific requirements that says where data
can be stored or processed.
4. Customization Requirements: To get full control over the configuration and
behavior of flex gateway.
20
23. Prerequisites - Docker
1. Anypoint Platform
2. Flex Gateway Permissions(in case of connected app)
3. Docker
23
24. Setting Up Flex Gateway On Docker
Step 1: Install Docker in your System
Step2: Download the Flex Gateway container image
docker pull mulesoft/flex-gateway:latest
Step3: Verify that the download succeeded
docker images mulesoft/flex-gateway
Step4: Register Flex Gateway to Anypoint Platform
docker run --entrypoint flexctl -u v "$(pwd)":/registration mulesoft/flex-gateway
register --organization=<organizationId> --token=<authToken>
--output-directory=/registration --connected=true <gateway-name>
24
25. Contd.
Step 5: Flex Gateway Run
docker run --rm -v "$(pwd)":/usr/local/share/mulesoft/flex-gateway/conf.d -p 8081:8081
mulesoft/flex-gateway
**Note: Kindly remove connected=true from Registration command of flex gateway in case of
local mode
25