Location Research Breakthrough Possible @S-Logix pro@slogix.in

API Gateway Management for a Legacy Insurance Claims Application Using Cloud-Native Services

Description

This project focuses on modernizing a legacy insurance claims application by placing an API Gateway in front of the existing application. The existing application and database remain unchanged, while the API Gateway manages incoming requests, security, routing, and traffic control. The solution is deployed on cloud and helps protect the legacy system from high traffic and unauthorized requests.

Aim

To implement a secure and reliable API Gateway architecture on cloud that protects the existing legacy insurance application, manages incoming requests, controls traffic, and provides centralized monitoring.

Objectives

01 Place an API Gateway in front of the existing legacy application.
02 Route incoming insurance claims requests to the correct backend services.
03 Apply authentication and rate limiting to protect the legacy application.
04 Create and manage cloud infrastructure using OpenTofu.
05 Automate server and gateway configuration using Ansible.
06 Monitor API traffic, performance, and errors using Prometheus and Grafana.

Application Workflow

01

Stage 1 – Claim Submission

Process

Policyholders or authorized staff submit insurance claims with policy details, incident information, and supporting documents.

Tools
Kong API Gateway PostgreSQL 14
Implementation

Kong receives the API request, applies authentication and routing rules, and forwards the request to the legacy claims application. Claim information is stored in PostgreSQL.

02

Stage 2 – Policy and Claim Validation

Process

The system verifies the policy, claimant details, coverage, and claim information.

Tools
Kong API Gateway REST APIs PostgreSQL 14
Implementation

Kong routes requests to the appropriate claims services. The application retrieves policy and customer information from PostgreSQL and communicates with external insurance systems through REST APIs.

03

Stage 3 – Document and Fraud Verification

Process

Submitted documents and claim information are checked for completeness, inconsistencies, and potential fraud.

Tools
Kong API Gateway REST APIs
Implementation

The API gateway securely routes verification requests to internal or external verification services. The results are returned to the claims application and recorded in PostgreSQL.

04

Stage 4 – Claim Assessment and Approval

Process

A claims officer reviews the validated claim and approves, rejects, or requests additional information.

Tools
Kong API Gateway PostgreSQL 14
Implementation

The gateway securely exposes the required claim-management APIs. The application retrieves claim information, updates the decision, and stores the result in PostgreSQL.

05

Stage 5 – Settlement and Claim Tracking

Process

Approved claims are processed for settlement, and policyholders can track their claim status.

Tools
Kong API Gateway REST APIs PostgreSQL 14
Implementation

Kong routes settlement and status requests to the appropriate services. Settlement information and claim status are stored in PostgreSQL and exposed through secured APIs.

Cloud Infrastructure and Tools

Cloud Compute Cloud EC2

Provides servers for the API Gateway and legacy application.

Operating System Ubuntu Server 24.04 LTS

Operating system used on the EC2 servers.

Cloud Network Cloud VPC

Provides the private network for the application and separates public and private resources.

Cloud Storage Cloud EBS

Provides persistent storage for the servers, database, and application logs.

API Gateway Tool Kong

Receives incoming requests, applies security and rate limits, and routes requests to the legacy application.

Database PostgreSQL 14

Stores insurance policies, claims, customer information, and transaction data.

Process Management Tool Systemd

Starts and manages the application, database, and gateway services on Ubuntu.

Infrastructure as Code Tool OpenTofu

Creates and manages Cloud infrastructure such as VPC and EC2 using code.

Automation Tool Ansible

Automates server configuration and installation of required software such as Kong.

Monitoring Tool Prometheus

Collects API, server, and application performance metrics.

Dashboard Tool Grafana

Displays API traffic, performance, and error information in dashboards.

Network Security cloud Security Groups

Control network access and protect the Cloud servers.

Implementation Process

01
Step 1 – Analyze the Legacy Application
  • Study the existing insurance claims application.
  • Identify its API endpoints, ports, and database connections.
  • Identify how incoming requests should reach the existing application.
  • Record the application's current performance and resource requirements.
02
Step 2 – Create the Cloud Infrastructure
  • Use OpenTofu to create the cloud VPC and required network components.
  • Create separate EC2 instances for the API Gateway and legacy application.
  • Install Ubuntu Server 24.04 LTS on the EC2 instances.
  • Create and attach EBS storage where required.
  • Configure cloud Security Groups to restrict direct access to the backend application.
03
Step 3 – Install and Configure the API Gateway
  • Use Ansible to configure the Ubuntu server.
  • Install Kong API Gateway on the public-facing EC2 server.
  • Configure Kong to route requests to the internal legacy application.
  • Test the connection between Kong and the backend application.
04
Step 4 – Configure Security and Traffic Control
  • Enable API authentication in Kong.
  • Configure rate limiting to control the number of requests from users.
  • Block unauthorized or excessive requests at the API Gateway.
  • Verify that valid insurance claims requests reach the legacy application correctly.
05
Step 5 – Monitoring and Testing
  • Deploy Prometheus to collect API and server metrics.
  • Connect Grafana to Prometheus for monitoring dashboards.
  • Test normal and high-volume insurance claim requests.
  • Verify that rate limiting protects the legacy application.
  • Check API performance, server health, and error rates.

Proposed Solution

The proposed solution places Kong API Gateway in front of the existing insurance claims application. The legacy Python application and PostgreSQL database remain unchanged. Kong acts as the main entry point for users, controlling authentication, rate limiting, and request routing. The infrastructure runs on cloud EC2 and Ubuntu Server inside an cloud VPC. OpenTofu manages the Cloud infrastructure, while Ansible automates server and Kong configuration. Prometheus and Grafana provide monitoring of API traffic, performance, and errors. This approach modernizes the application's access layer without requiring major changes to the existing legacy application.

Benefits

Legacy Application Protection: Kong protects the existing application from excessive traffic and unauthorized requests.
No Major Application Changes: The existing Python application and PostgreSQL database remain unchanged.
Centralized Security: Authentication and rate limiting are handled at the API Gateway.
Automated Infrastructure: OpenTofu and Ansible reduce manual configuration.
Better Monitoring: Prometheus and Grafana provide visibility into API and server performance.

Challenges

Legacy Compatibility: Ensuring the API Gateway works correctly with the existing application.
Traffic Management: Preventing high traffic from affecting the legacy system.
Gateway Availability: Ensuring the API Gateway does not become a single point of failure.
Network Configuration: Correctly controlling communication between users, Kong, and the backend application.
Monitoring: Managing API and server metrics to identify performance problems.