Chapter 58. Role Service


58.1. Role Service

58.1.1. ComputeEffectiveAccessScope

POST /v1/computeeffectiveaccessscope

ComputeEffectiveAccessScope

58.1.1.1. Description

Returns effective access scope based on the rules in the request. Does not persist anything; not idempotent due to possible changes to clusters and namespaces. POST is chosen due to potentially large payload. There are advantages in both keeping the response slim and detailed. If only IDs of selected clusters and namespaces are included, response latency and processing time are lower but the caller shall overlay the response with its view of the world which is susceptible to consistency issues. Listing all clusters and namespaces with related metadata is convenient for the caller but bloat the message with secondary data. We let the caller decide what level of detail they would like to have: - Minimal, when only roots of included subtrees are listed by their IDs. Clusters can be either INCLUDED (its namespaces are included but are not listed) or PARTIAL (at least one namespace is explicitly included). Namespaces can only be INCLUDED. - Standard [default], when all known clusters and namespaces are listed with their IDs and names. Clusters can be INCLUDED (all its namespaces are explicitly listed as INCLUDED), PARTIAL (all its namespaces are explicitly listed, some as INCLUDED and some as EXCLUDED), and EXCLUDED (all its namespaces are explicitly listed as EXCLUDED). Namespaces can be either INCLUDED or EXCLUDED. - High, when every cluster and namespace is augmented with metadata.

58.1.1.2. Parameters

58.1.1.2.1. Body Parameter
NameDescriptionRequiredDefaultPattern

accessScope

ComputeEffectiveAccessScopeRequestPayload

X

  
58.1.1.2.2. Query Parameters
NameDescriptionRequiredDefaultPattern

detail

 

-

STANDARD

 

58.1.1.3. Return Type

StorageEffectiveAccessScope

58.1.1.4. Content Type

  • application/json

58.1.1.5. Responses

Table 58.1. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

StorageEffectiveAccessScope

0

An unexpected error response.

GooglerpcStatus

58.1.1.6. Samples

58.1.2. CreateRole

POST /v1/roles/{name}

58.1.2.1. Description

58.1.2.2. Parameters

58.1.2.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

name

 

X

null

 
58.1.2.2.2. Body Parameter
NameDescriptionRequiredDefaultPattern

role

StorageRole

X

  

58.1.2.3. Return Type

Object

58.1.2.4. Content Type

  • application/json

58.1.2.5. Responses

Table 58.2. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

Object

0

An unexpected error response.

GooglerpcStatus

58.1.2.6. Samples

58.1.3. DeletePermissionSet

DELETE /v1/permissionsets/{id}

58.1.3.1. Description

58.1.3.2. Parameters

58.1.3.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

id

 

X

null

 

58.1.3.3. Return Type

Object

58.1.3.4. Content Type

  • application/json

58.1.3.5. Responses

Table 58.3. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

Object

0

An unexpected error response.

GooglerpcStatus

58.1.3.6. Samples

58.1.4. DeleteRole

DELETE /v1/roles/{id}

58.1.4.1. Description

58.1.4.2. Parameters

58.1.4.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

id

 

X

null

 

58.1.4.3. Return Type

Object

58.1.4.4. Content Type

  • application/json

58.1.4.5. Responses

Table 58.4. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

Object

0

An unexpected error response.

GooglerpcStatus

58.1.4.6. Samples

58.1.5. DeleteSimpleAccessScope

DELETE /v1/simpleaccessscopes/{id}

58.1.5.1. Description

58.1.5.2. Parameters

58.1.5.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

id

 

X

null

 

58.1.5.3. Return Type

Object

58.1.5.4. Content Type

  • application/json

58.1.5.5. Responses

Table 58.5. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

Object

0

An unexpected error response.

GooglerpcStatus

58.1.5.6. Samples

58.1.6. GetClustersForPermissions

GET /v1/sac/clusters

GetClustersForPermissions

58.1.6.1. Description

Returns the list of cluster ID and cluster name pairs that have at least read allowed by the scope of the requesting user for the list of requested permissions. Effective access scopes are only considered for input permissions that have cluster scope or narrower (i.e. global permissions from the input are ignored). If the input only contains permissions at global level, the output will be an empty list. If no permission is given in input, all clusters allowed by the requester scope for any permission with cluster scope or narrower will be part of the response.

58.1.6.2. Parameters

58.1.6.2.1. Query Parameters
NameDescriptionRequiredDefaultPattern

pagination.limit

 

-

null

 

pagination.offset

 

-

null

 

pagination.sortOption.field

 

-

null

 

pagination.sortOption.reversed

 

-

null

 

pagination.sortOption.aggregateBy.aggrFunc

 

-

UNSET

 

pagination.sortOption.aggregateBy.distinct

 

-

null

 

permissions

String

-

null

 

58.1.6.3. Return Type

V1GetClustersForPermissionsResponse

58.1.6.4. Content Type

  • application/json

58.1.6.5. Responses

Table 58.6. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

V1GetClustersForPermissionsResponse

0

An unexpected error response.

GooglerpcStatus

58.1.6.6. Samples

58.1.7. GetMyPermissions

GET /v1/mypermissions

58.1.7.1. Description

58.1.7.2. Parameters

58.1.7.3. Return Type

V1GetPermissionsResponse

58.1.7.4. Content Type

  • application/json

58.1.7.5. Responses

Table 58.7. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

V1GetPermissionsResponse

0

An unexpected error response.

GooglerpcStatus

58.1.7.6. Samples

58.1.8. GetNamespacesForClusterAndPermissions

GET /v1/sac/clusters/{clusterId}/namespaces

GetNamespacesForClusterAndPermissions

58.1.8.1. Description

Returns the list of namespace ID and namespace name pairs that belong to the requested cluster and for which the user has at least read access granted for the list of requested permissions that have namespace scope or narrower (i.e. global and cluster permissions from the input are ignored). If the input only contains permissions at global or cluster level, the output will be an empty list. If no permission is given in input, all namespaces allowed by the requester scope for any permission with namespace scope or narrower will be part of the response.

58.1.8.2. Parameters

58.1.8.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

clusterId

 

X

null

 
58.1.8.2.2. Query Parameters
NameDescriptionRequiredDefaultPattern

permissions

String

-

null

 

58.1.8.3. Return Type

V1GetNamespacesForClusterAndPermissionsResponse

58.1.8.4. Content Type

  • application/json

58.1.8.5. Responses

Table 58.8. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

V1GetNamespacesForClusterAndPermissionsResponse

0

An unexpected error response.

GooglerpcStatus

58.1.8.6. Samples

58.1.9. GetPermissionSet

GET /v1/permissionsets/{id}

58.1.9.1. Description

58.1.9.2. Parameters

58.1.9.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

id

 

X

null

 

58.1.9.3. Return Type

StoragePermissionSet

58.1.9.4. Content Type

  • application/json

58.1.9.5. Responses

Table 58.9. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

StoragePermissionSet

0

An unexpected error response.

GooglerpcStatus

58.1.9.6. Samples

58.1.10. GetResources

GET /v1/resources

58.1.10.1. Description

58.1.10.2. Parameters

58.1.10.3. Return Type

V1GetResourcesResponse

58.1.10.4. Content Type

  • application/json

58.1.10.5. Responses

Table 58.10. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

V1GetResourcesResponse

0

An unexpected error response.

GooglerpcStatus

58.1.10.6. Samples

58.1.11. GetRole

GET /v1/roles/{id}

58.1.11.1. Description

58.1.11.2. Parameters

58.1.11.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

id

 

X

null

 

58.1.11.3. Return Type

StorageRole

58.1.11.4. Content Type

  • application/json

58.1.11.5. Responses

Table 58.11. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

StorageRole

0

An unexpected error response.

GooglerpcStatus

58.1.11.6. Samples

58.1.12. GetRoles

GET /v1/roles

58.1.12.1. Description

58.1.12.2. Parameters

58.1.12.3. Return Type

V1GetRolesResponse

58.1.12.4. Content Type

  • application/json

58.1.12.5. Responses

Table 58.12. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

V1GetRolesResponse

0

An unexpected error response.

GooglerpcStatus

58.1.12.6. Samples

58.1.13. GetSimpleAccessScope

GET /v1/simpleaccessscopes/{id}

58.1.13.1. Description

58.1.13.2. Parameters

58.1.13.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

id

 

X

null

 

58.1.13.3. Return Type

StorageSimpleAccessScope

58.1.13.4. Content Type

  • application/json

58.1.13.5. Responses

Table 58.13. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

StorageSimpleAccessScope

0

An unexpected error response.

GooglerpcStatus

58.1.13.6. Samples

58.1.14. ListPermissionSets

GET /v1/permissionsets

58.1.14.1. Description

58.1.14.2. Parameters

58.1.14.3. Return Type

V1ListPermissionSetsResponse

58.1.14.4. Content Type

  • application/json

58.1.14.5. Responses

Table 58.14. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

V1ListPermissionSetsResponse

0

An unexpected error response.

GooglerpcStatus

58.1.14.6. Samples

58.1.15. ListSimpleAccessScopes

GET /v1/simpleaccessscopes

58.1.15.1. Description

58.1.15.2. Parameters

58.1.15.3. Return Type

V1ListSimpleAccessScopesResponse

58.1.15.4. Content Type

  • application/json

58.1.15.5. Responses

Table 58.15. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

V1ListSimpleAccessScopesResponse

0

An unexpected error response.

GooglerpcStatus

58.1.15.6. Samples

58.1.16. PostPermissionSet

POST /v1/permissionsets

PostPermissionSet

58.1.16.1. Description

PermissionSet.id is disallowed in request and set in response.

58.1.16.2. Parameters

58.1.16.2.1. Body Parameter
NameDescriptionRequiredDefaultPattern

body

This encodes a set of permissions for StackRox resources. StoragePermissionSet

X

  

58.1.16.3. Return Type

StoragePermissionSet

58.1.16.4. Content Type

  • application/json

58.1.16.5. Responses

Table 58.16. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

StoragePermissionSet

0

An unexpected error response.

GooglerpcStatus

58.1.16.6. Samples

58.1.17. PostSimpleAccessScope

POST /v1/simpleaccessscopes

PostSimpleAccessScope

58.1.17.1. Description

SimpleAccessScope.id is disallowed in request and set in response.

58.1.17.2. Parameters

58.1.17.2.1. Body Parameter
NameDescriptionRequiredDefaultPattern

body

Simple access scope is a (simple) selection criteria for scoped resources. It does not allow multi-component AND-rules nor set operations on names. StorageSimpleAccessScope

X

  

58.1.17.3. Return Type

StorageSimpleAccessScope

58.1.17.4. Content Type

  • application/json

58.1.17.5. Responses

Table 58.17. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

StorageSimpleAccessScope

0

An unexpected error response.

GooglerpcStatus

58.1.17.6. Samples

58.1.18. PutPermissionSet

PUT /v1/permissionsets/{id}

58.1.18.1. Description

58.1.18.2. Parameters

58.1.18.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

id

id is generated and cannot be changed.

X

null

 
58.1.18.2.2. Body Parameter
NameDescriptionRequiredDefaultPattern

body

RoleServicePutPermissionSetBody

X

  

58.1.18.3. Return Type

Object

58.1.18.4. Content Type

  • application/json

58.1.18.5. Responses

Table 58.18. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

Object

0

An unexpected error response.

GooglerpcStatus

58.1.18.6. Samples

58.1.19. PutSimpleAccessScope

PUT /v1/simpleaccessscopes/{id}

58.1.19.1. Description

58.1.19.2. Parameters

58.1.19.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

id

id is generated and cannot be changed.

X

null

 
58.1.19.2.2. Body Parameter
NameDescriptionRequiredDefaultPattern

body

RoleServicePutSimpleAccessScopeBody

X

  

58.1.19.3. Return Type

Object

58.1.19.4. Content Type

  • application/json

58.1.19.5. Responses

Table 58.19. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

Object

0

An unexpected error response.

GooglerpcStatus

58.1.19.6. Samples

58.1.20. UpdateRole

PUT /v1/roles/{name}

58.1.20.1. Description

58.1.20.2. Parameters

58.1.20.2.1. Path Parameters
NameDescriptionRequiredDefaultPattern

name

name and description are provided by the user and can be changed.

X

null

 
58.1.20.2.2. Body Parameter
NameDescriptionRequiredDefaultPattern

body

RoleServiceUpdateRoleBody

X

  

58.1.20.3. Return Type

Object

58.1.20.4. Content Type

  • application/json

58.1.20.5. Responses

Table 58.20. HTTP Response Codes
CodeMessageDatatype

200

A successful response.

Object

0

An unexpected error response.

GooglerpcStatus

58.1.20.6. Samples

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat