Search code examples
ibm-cloud-infrastructure

SoftLayer API: Is it possible to restrict user access to DNS management using the SoftLayer API (and not the SoftLayer portal)?


What I am trying to do:

Revoke all access rights and permissions for a user except the permission for DNS management using the SoftLayer API.

What I have done (using the SoftLayer python client):

  1. Revoked all user permissions by a) calling getPermissions() to retrieve the user permissions and b) calling removeBulkPortalPermission() for all the retrieved user permissions.
  2. Removed all virtual access rights by calling removeAllVirtualAccessForThisUser() for the user.
  3. Removed all hardware access right by calling removeAllHardwareAccessForThisUser() for the user.
  4. Granted the user DNS management permissions by calling addBulkPortalPermission([{"key": "DNS_1", "keyName": "DNS_MANAGE", "name": "Manage DNS"}]) -- addPortalPermission() could be used as well.

What is the issue:

The user can access functionality other than DNS management (e.g. Devices > Manage > Images).


Solution

  • The problem is that there is not any permission to "View Images Templates" that you can deny, so that is why he can see Devices->Manage->Images and it is the same case for the other stuff that are still being displayed.

    You can see all the permissions that you can deny in the portal by: 1.- Go Account->Users 2.- Click over the user you want to deny permissions 3.- Click Portal Permissions tab

    Using the API you only can deny the same permissions as using the Portal, you cannot deny more than that.

    Regards