Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding sub level scopes for admin APIs #12006

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public class ApiCategoriesApi {
@ApiOperation(value = "Delete an API Category", notes = "Delete an API Category by API Category Id ", response = Void.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:api_category", description = "Manage API categories")
})
}, tags={ "API Category (Individual)", })
@ApiResponses(value = {
Expand All @@ -61,7 +62,8 @@ public Response apiCategoriesApiCategoryIdDelete(@ApiParam(value = "API Category
@ApiOperation(value = "Update an API Category", notes = "Update an API Category by category Id ", response = APICategoryDTO.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:api_category", description = "Manage API categories")
})
}, tags={ "API Category (Individual)", })
@ApiResponses(value = {
Expand All @@ -79,7 +81,8 @@ public Response apiCategoriesApiCategoryIdPut(@ApiParam(value = "API Category UU
@ApiOperation(value = "Get all API Categories", notes = "Get all API categories ", response = APICategoryListDTO.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:api_category", description = "Manage API categories")
})
}, tags={ "API Category (Collection)", })
@ApiResponses(value = {
Expand All @@ -95,7 +98,8 @@ public Response apiCategoriesGet() throws APIManagementException{
@ApiOperation(value = "Add API Category", notes = "Add a new API category ", response = APICategoryDTO.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:api_category", description = "Manage API categories")
})
}, tags={ "API Category (Individual)" })
@ApiResponses(value = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public class KeyManagersApi {
@ApiOperation(value = "Retrieve Well-known information from Key Manager Well-known Endpoint", notes = "Retrieve well-known information from key manager's well-known endpoint ", response = KeyManagerWellKnownResponseDTO.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:keymanagers_m statusanage", description = "Manage Key Managers")
})
}, tags={ "Key Manager (Collection)", })
@ApiResponses(value = {
Expand All @@ -61,7 +62,8 @@ public Response keyManagersDiscoverPost(@Multipart(value = "url", required = fal
@ApiOperation(value = "Get all Key managers", notes = "Get all Key managers ", response = KeyManagerListDTO.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:keymanagers_manage", description = "Manage Key Managers")
})
}, tags={ "Key Manager (Collection)", })
@ApiResponses(value = {
Expand All @@ -77,7 +79,8 @@ public Response keyManagersGet() throws APIManagementException{
@ApiOperation(value = "Delete a Key Manager", notes = "Delete a Key Manager by keyManager id ", response = Void.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:keymanagers_manage", description = "Manage Key Managers")
})
}, tags={ "Key Manager (Individual)", })
@ApiResponses(value = {
Expand All @@ -94,7 +97,8 @@ public Response keyManagersKeyManagerIdDelete(@ApiParam(value = "Key Manager UUI
@ApiOperation(value = "Get a Key Manager Configuration", notes = "Retrieve a single Key Manager Configuration. We should provide the Id of the KeyManager as a path parameter. ", response = KeyManagerDTO.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:keymanagers_manage", description = "Manage Key Managers")
})
}, tags={ "Key Manager (Individual)", })
@ApiResponses(value = {
Expand All @@ -112,7 +116,8 @@ public Response keyManagersKeyManagerIdGet(@ApiParam(value = "Key Manager UUID "
@ApiOperation(value = "Update a Key Manager", notes = "Update a Key Manager by keyManager id ", response = KeyManagerDTO.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:keymanagers_manage", description = "Manage Key Managers")
})
}, tags={ "Key Manager (Individual)", })
@ApiResponses(value = {
Expand All @@ -130,7 +135,8 @@ public Response keyManagersKeyManagerIdPut(@ApiParam(value = "Key Manager UUID "
@ApiOperation(value = "Add a new API Key Manager", notes = "Add a new API Key Manager ", response = KeyManagerDTO.class, authorizations = {
@Authorization(value = "OAuth2Security", scopes = {
@AuthorizationScope(scope = "apim:admin", description = "Manage all admin operations"),
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations")
@AuthorizationScope(scope = "apim:admin_operations", description = "Manage API categories and Key Managers related operations"),
@AuthorizationScope(scope = "apim:keymanagers_manage", description = "Manage Key Managers")
})
}, tags={ "Key Manager (Collection)" })
@ApiResponses(value = {
Expand Down