Azure Services -Digital Lending
- Anand Nerurkar
- Aug 3
- 4 min read
Absolutely — I’ll break down each Azure service used in the Digital Lending Modernization architecture and explain:
Role in architecture
Step-by-step configuration/implementation
Integration with microservices
Compliance/security controls
Best practices for BFSI active-active setup
This will give you an end-to-end view and you can map it directly into design and implementation phases.
Azure Services – Step-by-Step Implementation
1. Azure Front Door (Global Routing + WAF)
Role
Global entry point for Angular SPA and API traffic.
Provides WAF (Web Application Firewall) to mitigate DDoS, OWASP attacks.
Routes requests to nearest active region (active-active deployment).
Step-by-Step
Create Front Door in Azure Portal.
Configure two backends:
APIM in Central India
APIM in South India
Enable health probes for failover.
Attach WAF policy (block SQLi, XSS, rate limiting).
Configure custom domain + HTTPS (TLS) with Azure-managed certificates.
Integration
Angular SPA → Front Door → APIM (private AKS API).
Compliance
WAF logs → Azure Monitor → stored in Data Lake (7 years for audit).
Geo-filtering → restrict access to India (RBI compliance).
2. Azure API Management (APIM)
Role
API gateway for microservices.
Enforces throttling, JWT auth, and multi-tenant routing.
Step-by-Step
Deploy APIM in internal VNet mode (integrated with AKS private subnet).
Define APIs:
Loan API (/loan)
KYC API (/kyc)
Credit API (/credit)
Apply policies:
Rate limit per tenant (ICICI vs HDFC).
Transform headers (add tenantId).
Mask sensitive PII in logs.
Integration
Exposes APIs securely to Angular app (public subnet).
Routes to Istio ingress gateway in AKS.
Compliance
APIM audit logs → Azure Monitor → WORM-enabled Data Lake.
Enforce OAuth2/JWT from Azure AD B2C.
3. Azure Kubernetes Service (AKS) + Istio
Role
Host microservices (Loan, KYC, Credit, Fraud, Disbursement).
Istio provides service mesh: mTLS, traffic routing, circuit breaking.
Step-by-Step
Provision AKS with private cluster mode.
Install Istio via Helm:
bash
CopyEdit
helm repo add istio https://istio-release.storage.googleapis.com/charts helm install istio-base istio/base -n istio-system helm install istiod istio/istiod -n istio-system
Configure Istio Ingress Gateway for API traffic.
Define DestinationRules and VirtualServices for canary deployments.
Enable pod auto-scaling with KEDA (event-driven).
Integration
All microservices communicate over Istio with mTLS.
Kafka (Event Hub) also integrated into Istio mesh for observability.
Compliance
AKS nodes in India region; Azure Policy denies other region deployments.
Secrets via Key Vault CSI driver.
4. Azure Event Hub (Kafka API)
Role
Event store for event sourcing pattern.
Used by CQRS: Loan events → Projections in Cosmos DB/Azure SQL.
Step-by-Step
Create Event Hub namespace with Kafka endpoint enabled.
Create topic loan-events with partitions (key = loanId).
Configure retention = 7 days (hot), archive to Data Lake for long-term.
Spring Boot microservices use Kafka clients to publish/consume.
Integration
Loan Service emits LoanApplied.
KYC/Credit/Fraud services consume & emit KYCVerified, CreditChecked, etc.
Compliance
Immutable event log replicated to Data Lake (WORM for 10 years).
Encryption with Azure-managed keys.
5. Azure Cosmos DB
Role
NoSQL database for projections (read side of CQRS).
Stores KYC documents and real-time loan status views.
Step-by-Step
Create Cosmos DB (API: Core SQL).
Define container loanStatusView partitioned by loanId.
Set TTL for projections (e.g., 90 days) if ephemeral.
Enable multi-region writes (for active-active).
Integration
Azure Functions consume Event Hub → update Cosmos projections.
Angular dashboard queries Cosmos read models via APIM.
Compliance
Data encrypted with CMK (Key Vault).
Tenant isolation via partition key.
6. Azure SQL Database
Role
Relational data store for loan master records.
Used for financial transactions, regulatory reports.
Step-by-Step
Create Azure SQL in business-critical tier (HA + geo-replication).
Configure failover groups between regions.
Implement stored procs for reconciliation with legacy core banking.
Integration
Disbursement service writes final loan transactions.
Synapse pulls data for RBI/SEBI reports.
Compliance
TDE (Transparent Data Encryption) mandatory.
Row-level security for tenant isolation.
7. Azure Data Lake Storage (WORM)
Role
Immutable storage for audit trails (RBI requires 10-year retention).
Step-by-Step
Create Data Lake Gen2 with WORM (immutability) enabled.
Configure Event Hub capture to write raw events to Data Lake.
Partition data by YYYY/MM/DD for efficient query.
Integration
Synapse Analytics queries directly for compliance dashboards.
Compliance
WORM policy locked (cannot delete/modify).
Access via RBAC and Managed Identities.
8. Azure Synapse Analytics + Power BI
Role
Analytics for KPIs (loan turnaround, fraud detection rate, NPA trends).
Generates SEBI/RBI regulatory reports.
Step-by-Step
Create Synapse workspace connected to Data Lake and Azure SQL.
Build pipelines for:
Daily loan disbursement report
Monthly regulatory compliance metrics
Power BI dashboards connected to Synapse views.
9. Azure DevOps + DevSecOps Pipeline
Role
CI/CD with integrated security (DevSecOps).
Step-by-Step
Code repository (GitHub or Azure Repos).
CI pipeline:
Build → Unit Test → SonarQube (SAST) → Dependency Scan (OWASP) → Docker Build → ACR.
CD pipeline:
Helm deploy to AKS (canary via Istio).
DAST (OWASP ZAP) on staging.
Post-deployment:
Azure Policy compliance check.
Monitor via Azure Monitor.
10. Azure Policy & Blueprints
Role
Enforce governance:
Region restriction (India only).
Encryption at rest.
Only ACR images deployable to AKS.
Step-by-Step
Create custom policy definitions (deny non-India region).
Assign policies at subscription level.
Bundle into Blueprint:
VNet
AKS
APIM
Key Vault
Event Hub
11. Azure Virtual Network (VNet) with Public/Private Subnets
Role
Network isolation for BFSI workloads.
Step-by-Step
Create VNet with two subnets:
Public Subnet: Angular app, Front Door, APIM.
Private Subnet: AKS, Event Hub, Cosmos DB, Azure SQL.
NSG Rules:
Public subnet → Private subnet (API only).
Private subnet → Internet (egress via NAT Gateway).
Deny lateral movement between private resources.
12. Azure Key Vault
Role
Centralized secret management for microservices.
Step-by-Step
Create Key Vault with RBAC enabled.
Store:
DB connection strings
API keys (Credit Bureau, Aadhaar API)
Certificates
Integrate with AKS using Key Vault CSI driver.
Compliance Considerations (Across All Services)
Data Residency: All services deployed in India Central/South.
Encryption: TDE for SQL, encryption-at-rest for Cosmos/Blob, Key Vault for keys.
Audit Logging: Azure Monitor → Data Lake.
Network Security: Private Endpoints, NSG, no public DB exposure.
KPIs Tracked via Synapse/Power BI
Business KPIs
Loan approval SLA (minutes)
Drop-off rate during KYC
Fraud detection accuracy
NPA ratio
Operational KPIs
API latency (P95)
Event Hub lag
AKS node utilization
Deployment success rate
Comments