Skip to content

CORS - Istio configuration

Srishti Sharma requested to merge ssCORS_E2E_istio into master

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: image (7).png

image (8).png

========================================

  • 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: - image (2).png

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 image (4).png

image (5).png

4. Test with allowed origin: image (10).png

image (11).png

image (12).png

Merge request reports