CORS - Istio configuration
Description
PBI: 14514 - CORS end to end integration
=======================================
Picking CORS values during instance creation and passing to istio
Present day - without CORS: - Without CORS - tested for legal service - all origins allowed It shows hardcoded core-common values with * for origins:
========================================
- After CORS - Local test performed: File service takes latest core-lib version which has CORS changes and we see CORS working. Screenshots below:
Passing CORS values during instance creation using postman { "location": "northeurope", "tags": { "env": "local" }, "properties": { "authAppId": "2f59abbc-7b40-4d0e-91b2-22ca3084bc84", "dataPartitionNames": [ { "name": "opendes" } ], "CorsRules":[ { "allowedHeaders" : ["origin", "authorization", "data-partition-id"], "allowedOrigins" : ["www.dummy.com ","www.dummy2.com "], "exposedHeaders" : ["origin"], "allowedMethods": ["GET", "POST"], "maxAgeInSeconds" : 101 } ] } }
Verified AKS of created instance reflects the CORS values passed: - Istio gets updated with values: -
Tested if CORS is working by raising request from a non-allowed origin and confirmed that request is blocked API: https://sstest08122.oep.ppe.azure-int.net/api/file/v2/files/uploadURL