Skip to content

Commit

Permalink
1300: Reverting change to the cors ESV as it is shared across a tenant (
Browse files Browse the repository at this point in the history
#50)

Reverting cors ESV name to `esv-cors-accepted-origins`

This configuration applies to the tenant as a whole, if the tenant needs to support multiple realms then the value of `esv-cors-accepted-origins` needs to be a list containing all the accepted origins for both realms.

SecureApiGateway/SecureApiGateway#1300
  • Loading branch information
dbadham-fr authored Apr 10, 2024
1 parent b752556 commit fb50d9a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
4 changes: 3 additions & 1 deletion sapig-overlay/core/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ OAUTH2_AGENTS='{

#ESV_CORE_BASEURL=
#ESV_CORE_MTLS_BASEURL=
#ESV_CORE_CORS_ACCEPTED_ORIGINS=
#ESV_CORE_SAPIG_IDENTITY_CLOUD_REALM=

# NOTE: cors conf applies to the whole tenant and not just a realm
#ESV_CORS_ACCEPTED_ORIGINS=

# ESV Secrets - the below values need to be supplied when doing fr-config-push secrets
#ESV_CORE_AM_OAUTH2_CA_CERTS_1=

Expand Down
2 changes: 1 addition & 1 deletion sapig-overlay/core/cors/cors-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"OPTIONS"
],
"acceptedOrigins": {
"$list": "&{esv.sapig.core.cors.accepted.origins}"
"$list": "&{esv.cors.accepted.origins}"
},
"allowCredentials": true,
"enabled": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"_id": "esv-cors-accepted-origins",
"description": "",
"expressionType": "list",
"valueBase64": "${ESV_CORS_ACCEPTED_ORIGINS}"
}

This file was deleted.

4 changes: 3 additions & 1 deletion sapig-overlay/ob/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ OAUTH2_AGENTS='{

#ESV_OB_BASEURL=
#ESV_OB_MTLS_BASEURL=
#ESV_OB_CORS_ACCEPTED_ORIGINS=
#ESV_OB_SAPIG_IDENTITY_CLOUD_REALM=

# NOTE: cors conf applies to the whole tenant and not just a realm
#ESV_CORS_ACCEPTED_ORIGINS=

# ESV Secrets - the below values need to be supplied when doing fr-config-push secrets
#ESV_OB_AM_OAUTH2_CA_CERTS_1=

Expand Down
2 changes: 1 addition & 1 deletion sapig-overlay/ob/cors/cors-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"OPTIONS"
],
"acceptedOrigins": {
"$list": "&{esv.sapig.ob.cors.accepted.origins}"
"$list": "&{esv.cors.accepted.origins}"
},
"allowCredentials": true,
"enabled": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"_id": "esv-cors-accepted-origins",
"description": "",
"expressionType": "list",
"valueBase64": "${ESV_CORS_ACCEPTED_ORIGINS}"
}

This file was deleted.

0 comments on commit fb50d9a

Please sign in to comment.