Visibility settings prevent certain user roles from viewing and modifying APIs created by another user role. This feature allows you to restrict the ability to view and modify APIs for a set of users.
This is available only as a WUM update and is effective from 6th December 2017 (2017-12-06). For more information on updating WSO2 API Manager, see Updating WSO2 Products.
Enabling Access Control
Shut down WSO2 API Manager before doing the following configurations.
Skip step 1 if you are using WSO2 API Manager 2.1.0 - Update 2 or later
To enable this feature, open the
<API-M_HOME>/repository/conf/api-manager.xmlfile. Add the code given below under <
Follow step 2 and step 3 only if you are enabling this feature for the first time.
Download the Access Control Migration Client from here and copy it to the
Start the server with -DmigrateAccessControl=true. The sample command is given below.
Using the API Publisher UI
- Log in to API Publisher as an API Creator. For more information on User Roles, see Managing Users and Roles.
- Create an API. Select Restricted by roles for Access Control in the Design tab.
Add the roles that have permission to view or modify this API.
Ensure that the roles you add are valid. If the current creator is not an APIM admin, there should be at least one role of the current creator.
Users with APIM admin permission are treated differently. Even if an API is restricted to certain set of creators of publishers, it will be visible to all the API creators and publishers with the API-M admin permission.
Using the REST API
You can use the existing REST API to add a new API. To create an API with publisher access control restriction, add the two elements shown below in your request body,
Note that the roles should be valid. If the API creator is not an API-M admin he/she should at least have one of his/her roles in the
This feature is available and enabled by default in WSO2 API Manager - Update 2 or later
The publisher role cache is enabled by default in API Manager. This is to avoid sending repeated requests to the Key Manager node in a distributed deployment, to authenticate user roles.
This WUM update allows you to disable the feature by disabling
<CacheConfigurations>. We recommend enabling the elements shown in the example below.
Note that if disabled it results in lowering performance due to repeatedly accessing the Key Manager.