How to restrict a role to not access 'Key Value Maps' under Environment Configuration?

Not applicable

Hi,

We have a requirement to restrict access to 'Key Value Maps' (see attached picture) under Environment Configuration for certain users.

apigee1.png

I am trying to create custom role for this. But, it appears, I cannot restrict access to 'Key Value Maps'.

apigee2.png

Does anybody know how to achieve this or have run into this kind of a use case?

Thanks.

Solved Solved
0 2 181
1 ACCEPTED SOLUTION

HI @ukuchima

For this you will need to set permissions using the Mgmt API

In your case, the curl will be

curl -X POST \
  https://api.enterprise.apigee.com/v1/organizations/{org}/userroles/{custom_role}/resourcepermissions \
  -H 'authorization: Basic {auth}' \
  -H 'content-type: application/json' \
  -d '{
 "resourcePermission" : [ 
   {
    "path" : "/environments/*/keyvaluemaps",
    "permissions" : []
   }, 
   {
    "path" : "/environments/*/keyvaluemaps/*",
    "permissions" : []
   }
  ]
}'

This will set explicit restricted permissions on the keyvaluemaps resources across different environments.

Hope this helps

View solution in original post

2 REPLIES 2

HI @ukuchima

For this you will need to set permissions using the Mgmt API

In your case, the curl will be

curl -X POST \
  https://api.enterprise.apigee.com/v1/organizations/{org}/userroles/{custom_role}/resourcepermissions \
  -H 'authorization: Basic {auth}' \
  -H 'content-type: application/json' \
  -d '{
 "resourcePermission" : [ 
   {
    "path" : "/environments/*/keyvaluemaps",
    "permissions" : []
   }, 
   {
    "path" : "/environments/*/keyvaluemaps/*",
    "permissions" : []
   }
  ]
}'

This will set explicit restricted permissions on the keyvaluemaps resources across different environments.

Hope this helps

Thank you @Sai Saran Vaidyanathan. This worked.