diff --git a/schemas/2021-04-01-preview/Microsoft.ApiManagement.json b/schemas/2021-04-01-preview/Microsoft.ApiManagement.json index 20da4ae84a..a55520125d 100644 --- a/schemas/2021-04-01-preview/Microsoft.ApiManagement.json +++ b/schemas/2021-04-01-preview/Microsoft.ApiManagement.json @@ -1954,6 +1954,70 @@ "properties" ], "description": "Microsoft.ApiManagement/service/portalsettings" + }, + { + "type": "object", + "properties": { + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^.*/csp$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PortalSettingsCspProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The developer portal Content Security Policy (CSP) settings contract properties." + } + }, + "required": [ + "name", + "properties" + ], + "description": "Microsoft.ApiManagement/service/portalsettings" + }, + { + "type": "object", + "properties": { + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^.*/cors$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PortalSettingsCorsProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + } + }, + "required": [ + "name", + "properties" + ], + "description": "Microsoft.ApiManagement/service/portalsettings" } ], "properties": { @@ -5229,6 +5293,66 @@ } } }, + "PortalSettingsCorsProperties": { + "type": "object", + "properties": { + "allowedOrigins": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Allowed origins, e.g. `https://trusted.com`." + } + }, + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + }, + "PortalSettingsCspProperties": { + "type": "object", + "properties": { + "allowedSources": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Allowed sources, e.g. `*.trusted.com`, `trusted.com`, `https://`." + }, + "mode": { + "oneOf": [ + { + "type": "string", + "enum": [ + "enabled", + "disabled", + "reportOnly" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The mode of the developer portal Content Security Policy (CSP)." + }, + "reportUri": { + "type": "string", + "description": "The URL used by the browser to report CSP violations." + } + }, + "description": "The developer portal Content Security Policy (CSP) settings contract properties." + }, "PortalSigninSettingProperties": { "type": "object", "properties": { @@ -7347,6 +7471,60 @@ "properties" ], "description": "Microsoft.ApiManagement/service/portalsettings" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "csp" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PortalSettingsCspProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The developer portal Content Security Policy (CSP) settings contract properties." + } + }, + "required": [ + "name", + "properties" + ], + "description": "Microsoft.ApiManagement/service/portalsettings" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "enum": [ + "cors" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/PortalSettingsCorsProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The developer portal Cross-Origin Resource Sharing (CORS) settings contract properties." + } + }, + "required": [ + "name", + "properties" + ], + "description": "Microsoft.ApiManagement/service/portalsettings" } ], "properties": {