diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/config/APIMConfigServiceImpl.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/config/APIMConfigServiceImpl.java index d00872559166..4a768a7d946c 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/config/APIMConfigServiceImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/config/APIMConfigServiceImpl.java @@ -46,6 +46,8 @@ import java.io.IOException; import java.io.StringReader; import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Iterator; /** @@ -176,7 +178,62 @@ public String getTenantConfig(String organization) throws APIManagementException if (organization == null) { organization = MultitenantConstants.SUPER_TENANT_DOMAIN_NAME; } - return systemConfigurationsDAO.getSystemConfig(organization, ConfigType.TENANT.toString()); + return addMissingScopes(systemConfigurationsDAO.getSystemConfig(organization, ConfigType.TENANT.toString())); + } + + /* + * This method facilitates the on-the-fly migration of the scope section in the tenant-config.json. This + * checks whether RESTAPIScopes section has newly introduced scopes and add them to the json String if it + * is not available. + */ + private String addMissingScopes(String systemConfig) { + if (systemConfig == null) { + return null; + } + // List of newly introduced scopes + String[] scopesToCheck = { + "apim:admin_tier_view", + "apim:admin_tier_manage", + "apim:keymanagers_manage", + "apim:api_category" + }; + + ArrayList missingScopesList = new ArrayList<>(Arrays.asList(scopesToCheck)); + + JsonParser jsonParser = new JsonParser(); + JsonObject jsonObject = jsonParser.parse(systemConfig).getAsJsonObject(); + + // Get the existing rest api scopes + if (jsonObject.has("RESTAPIScopes")) { + JsonObject restApiScopes = jsonObject.getAsJsonObject("RESTAPIScopes"); + if (restApiScopes.has("Scope")) { + JsonArray scopeArray = restApiScopes.getAsJsonArray("Scope"); + for (int i = 0; i < scopeArray.size(); i++) { + String existingScope = scopeArray.get(i).getAsJsonObject().get("Name").getAsString(); + if (missingScopesList.contains(existingScope)) { + missingScopesList.remove(existingScope); + } + } + } + } + + // Check if there is no missing scopes in the tenant-conf.json and return the original file + if (missingScopesList.isEmpty()) { + return systemConfig; + } + + JsonArray scopeArray = jsonObject.getAsJsonObject("RESTAPIScopes").getAsJsonArray("Scope"); + // Add the missing scopes to the tenant-conf + for (String missingScope : missingScopesList) { + JsonObject newScope = new JsonObject(); + newScope.addProperty("Name", missingScope); + newScope.addProperty("Roles", "admin"); + scopeArray.add(newScope); + } + + // Convert the modified JSON back to a string + String modifiedJson = jsonObject.toString(); + return modifiedJson; } @Override @@ -188,6 +245,9 @@ public void updateTenantConfig(String organization, String tenantConfig) throws Cache tenantConfigCache = CacheProvider.getTenantConfigCache(); String cacheName = organization + "_" + APIConstants.TENANT_CONFIG_CACHE_NAME; tenantConfigCache.remove(cacheName); + + // Clear restapi scope cache + CacheProvider.getRESTAPIScopeCache().remove(organization); systemConfigurationsDAO.updateSystemConfig(organization, ConfigType.TENANT.toString(), tenantConfig); } diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/resources/tenant/tenant-conf.json b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/resources/tenant/tenant-conf.json index b8bab6c3a32f..0079f68a6d02 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/resources/tenant/tenant-conf.json +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/resources/tenant/tenant-conf.json @@ -348,6 +348,14 @@ { "Name": "apim:policies_import_export", "Roles": "admin,Internal/devops" + }, + { + "Name": "apim:admin_tier_manage", + "Roles": "admin" + }, + { + "Name": "apim:admin_tier_view", + "Roles": "admin" } ] }, diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/admin/v1/ThrottlingApi.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/admin/v1/ThrottlingApi.java index 46af8ca848e4..04e8143ae392 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/admin/v1/ThrottlingApi.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/gen/java/org/wso2/carbon/apimgt/rest/api/admin/v1/ThrottlingApi.java @@ -57,6 +57,7 @@ public class ThrottlingApi { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies"), @AuthorizationScope(scope = "apim:policies_import_export", description = "Export and import policies related operations") }) }, tags={ "Import Export", }) @@ -76,6 +77,7 @@ public Response exportThrottlingPolicy( @ApiParam(value = "UUID of the Throttlin @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies"), @AuthorizationScope(scope = "apim:policies_import_export", description = "Export and import policies related operations") }) }, tags={ "Import Export", }) @@ -184,7 +186,8 @@ public Response throttlingDenyPolicyConditionIdPatch(@ApiParam(value = "Blocking @ApiOperation(value = "Get all Advanced Throttling Policies", notes = "Retrieves all existing advanced throttling policies. ", response = AdvancedThrottlePolicyListDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies") + @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies") }) }, tags={ "Advanced Policy (Collection)", }) @ApiResponses(value = { @@ -202,6 +205,7 @@ public Response throttlingPoliciesAdvancedGet( @ApiParam(value = "Media types ac @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies"), @AuthorizationScope(scope = "apim:policies_import_export", description = "Export and import policies related operations") }) }, tags={ "Advanced Policy (Individual)", }) @@ -219,7 +223,8 @@ public Response throttlingPoliciesAdvancedPolicyIdDelete(@ApiParam(value = "Thor @ApiOperation(value = "Get an Advanced Throttling Policy", notes = "Retrieves an advanced throttling policy. ", response = AdvancedThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies") + @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies") }) }, tags={ "Advanced Policy (Individual)", }) @ApiResponses(value = { @@ -237,7 +242,8 @@ public Response throttlingPoliciesAdvancedPolicyIdGet(@ApiParam(value = "Thorttl @ApiOperation(value = "Update an Advanced Throttling Policy", notes = "Updates an existing Advanced throttling policy. ", response = AdvancedThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies") + @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies") }) }, tags={ "Advanced Policy (Individual)", }) @ApiResponses(value = { @@ -255,7 +261,8 @@ public Response throttlingPoliciesAdvancedPolicyIdPut(@ApiParam(value = "Thorttl @ApiOperation(value = "Add an Advanced Throttling Policy", notes = "Add a new advanced throttling policy. ", response = AdvancedThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies") + @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies") }) }, tags={ "Advanced Policy (Collection)", }) @ApiResponses(value = { @@ -273,7 +280,8 @@ public Response throttlingPoliciesAdvancedPost( @NotNull @ApiParam(value = "Med @ApiOperation(value = "Get all Application Throttling Policies", notes = "Retrieves all existing application throttling policies. ", response = ApplicationThrottlePolicyListDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies") + @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies") }) }, tags={ "Application Policy (Collection)", }) @ApiResponses(value = { @@ -291,6 +299,7 @@ public Response throttlingPoliciesApplicationGet( @ApiParam(value = "Media types @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies"), @AuthorizationScope(scope = "apim:policies_import_export", description = "Export and import policies related operations") }) }, tags={ "Application Policy (Individual)", }) @@ -308,7 +317,8 @@ public Response throttlingPoliciesApplicationPolicyIdDelete(@ApiParam(value = "T @ApiOperation(value = "Get an Application Throttling Policy", notes = "Retrieves an application throttling policy. ", response = ApplicationThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies") + @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies") }) }, tags={ "Application Policy (Individual)", }) @ApiResponses(value = { @@ -326,7 +336,8 @@ public Response throttlingPoliciesApplicationPolicyIdGet(@ApiParam(value = "Thor @ApiOperation(value = "Update an Application Throttling policy", notes = "Updates an existing application level throttling policy. Upon a succesfull update, you will receive the updated application policy as the response. ", response = ApplicationThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies") + @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies") }) }, tags={ "Application Policy (Individual)", }) @ApiResponses(value = { @@ -344,7 +355,8 @@ public Response throttlingPoliciesApplicationPolicyIdPut(@ApiParam(value = "Thor @ApiOperation(value = "Add an Application Throttling Policy", notes = "This operation can be used to add a new application level throttling policy. ", response = ApplicationThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies") + @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies") }) }, tags={ "Application Policy (Collection)", }) @ApiResponses(value = { @@ -362,7 +374,8 @@ public Response throttlingPoliciesApplicationPost( @NotNull @ApiParam(value = " @ApiOperation(value = "Get all Custom Rules", notes = "Retrieves all custom rules. **NOTE:** * Only super tenant users are allowed for this operation. ", response = CustomRuleListDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies") + @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies") }) }, tags={ "Custom Rules (Collection)", }) @ApiResponses(value = { @@ -379,7 +392,8 @@ public Response throttlingPoliciesCustomGet( @ApiParam(value = "Media types acce @ApiOperation(value = "Add a Custom Rule", notes = "Adds a new custom rule. **NOTE:** * Only super tenant users are allowed for this operation. ", response = CustomRuleDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies") + @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies") }) }, tags={ "Custom Rules (Collection)", }) @ApiResponses(value = { @@ -398,6 +412,7 @@ public Response throttlingPoliciesCustomPost( @NotNull @ApiParam(value = "Media @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies"), @AuthorizationScope(scope = "apim:policies_import_export", description = "Export and import policies related operations") }) }, tags={ "Custom Rules (Individual)", }) @@ -415,7 +430,8 @@ public Response throttlingPoliciesCustomRuleIdDelete(@ApiParam(value = "Custom r @ApiOperation(value = "Get a Custom Rule", notes = "Retrieves a custom rule. We need to provide the policy Id as a path parameter. **NOTE:** * Only super tenant users are allowed for this operation. ", response = CustomRuleDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies") + @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies") }) }, tags={ "Custom Rules (Individual)", }) @ApiResponses(value = { @@ -433,7 +449,8 @@ public Response throttlingPoliciesCustomRuleIdGet(@ApiParam(value = "Custom rule @ApiOperation(value = "Update a Custom Rule", notes = "Updates an existing custom rule. **NOTE:** * Only super tenant users are allowed for this operation. ", response = CustomRuleDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies") + @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies") }) }, tags={ "Custom Rules (Individual)", }) @ApiResponses(value = { @@ -451,7 +468,8 @@ public Response throttlingPoliciesCustomRuleIdPut(@ApiParam(value = "Custom rule @ApiOperation(value = "Get all Subscription Throttling Policies", notes = "This operation can be used to retrieve all Subscription level throttling policies. ", response = SubscriptionThrottlePolicyListDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies") + @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies") }) }, tags={ "Subscription Policy (Collection)", }) @ApiResponses(value = { @@ -469,6 +487,7 @@ public Response throttlingPoliciesSubscriptionGet( @ApiParam(value = "Media type @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies"), @AuthorizationScope(scope = "apim:policies_import_export", description = "Export and import policies related operations") }) }, tags={ "Subscription Policy (Individual)", }) @@ -486,7 +505,8 @@ public Response throttlingPoliciesSubscriptionPolicyIdDelete(@ApiParam(value = " @ApiOperation(value = "Get a Subscription Policy", notes = "This operation can be used to retrieves subscription level throttling policy by specifying the Id of the policy as a path paramter ", response = SubscriptionThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies") + @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies") }) }, tags={ "Subscription Policy (Individual)", }) @ApiResponses(value = { @@ -504,7 +524,8 @@ public Response throttlingPoliciesSubscriptionPolicyIdGet(@ApiParam(value = "Tho @ApiOperation(value = "Update a Subscription Policy", notes = "Updates an existing subscription level throttling policy. ", response = SubscriptionThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies") + @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies") }) }, tags={ "Subscription Policy (Individual)", }) @ApiResponses(value = { @@ -522,7 +543,8 @@ public Response throttlingPoliciesSubscriptionPolicyIdPut(@ApiParam(value = "Tho @ApiOperation(value = "Add a Subscription Throttling Policy", notes = "This operation can be used to add a Subscription level throttling policy specifying the details of the policy in the payload. ", response = SubscriptionThrottlePolicyDTO.class, authorizations = { @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), - @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies") + @AuthorizationScope(scope = "apim:tier_manage", description = "Update and delete throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_manage", description = "Update and delete throttling policies") }) }, tags={ "Subscription Policy (Collection)", }) @ApiResponses(value = { @@ -541,6 +563,7 @@ public Response throttlingPoliciesSubscriptionPost( @NotNull @ApiParam(value = @Authorization(value = "OAuth2Security", scopes = { @AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"), @AuthorizationScope(scope = "apim:tier_view", description = "View throttling policies"), + @AuthorizationScope(scope = "apim:admin_tier_view", description = "View throttling policies"), @AuthorizationScope(scope = "apim:policies_import_export", description = "Export and import policies related operations") }) }, tags={ "Unified Search" }) diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/main/resources/admin-api.yaml b/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/main/resources/admin-api.yaml index 1d7e2e27960b..1eab984997a8 100755 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/main/resources/admin-api.yaml +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.admin.v1/src/main/resources/admin-api.yaml @@ -145,6 +145,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view - apim:policies_import_export x-code-samples: - lang: Curl @@ -185,6 +186,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -248,6 +250,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage x-code-samples: - lang: Curl source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -301,6 +304,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -364,6 +368,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage x-code-samples: - lang: Curl source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -389,6 +394,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage - apim:policies_import_export x-code-samples: - lang: Curl @@ -429,6 +435,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -497,6 +504,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage x-code-samples: - lang: Curl source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -555,6 +563,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -623,6 +632,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage x-code-samples: - lang: Curl source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -648,6 +658,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage - apim:policies_import_export x-code-samples: - lang: Curl @@ -690,6 +701,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -755,6 +767,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage x-code-samples: - lang: Curl source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -810,6 +823,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -875,6 +889,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage x-code-samples: - lang: Curl source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -903,6 +918,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage - apim:policies_import_export x-code-samples: - lang: Curl @@ -942,6 +958,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -1005,6 +1022,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage x-code-samples: - lang: Curl source: 'curl -k -X POST -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -1058,6 +1076,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_view + - apim:admin_tier_view x-code-samples: - lang: Curl source: 'curl -k -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -1121,6 +1140,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage x-code-samples: - lang: Curl source: 'curl -k -X PUT -H "Authorization: Bearer ae4eae22-3f65-387b-a171-d37eaa366fa8" @@ -1146,6 +1166,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage - apim:policies_import_export x-code-samples: - lang: Curl @@ -1233,6 +1254,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage - apim:policies_import_export x-code-samples: - lang: Curl @@ -1286,6 +1308,7 @@ paths: - OAuth2Security: - apim:admin - apim:tier_manage + - apim:admin_tier_manage - apim:policies_import_export x-code-samples: - lang: Curl @@ -5208,6 +5231,8 @@ components: apim:admin: Manage all admin operations apim:tier_view: View throttling policies apim:tier_manage: Update and delete throttling policies + apim:admin_tier_view: View throttling policies + apim:admin_tier_manage: Update and delete throttling policies apim:bl_view: View deny policies apim:bl_manage: Update and delete deny policies apim:mediation_policy_view: View mediation policies