Chapter 58. Role Service
58.1. Role Service Copy linkLink copied to clipboard!
58.1.1. ComputeEffectiveAccessScope Copy linkLink copied to clipboard!
POST /v1/computeeffectiveaccessscope
ComputeEffectiveAccessScope
58.1.1.1. Description Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
58.1.1.2.1. Body Parameter Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| accessScope | X |
58.1.1.2.2. Query Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| detail | - | STANDARD |
58.1.1.3. Return Type Copy linkLink copied to clipboard!
58.1.1.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.1.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.1.6. Samples Copy linkLink copied to clipboard!
58.1.2. CreateRole Copy linkLink copied to clipboard!
POST /v1/roles/{name}
58.1.2.1. Description Copy linkLink copied to clipboard!
58.1.2.2. Parameters Copy linkLink copied to clipboard!
58.1.2.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| name | X | null |
58.1.2.2.2. Body Parameter Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| role | X |
58.1.2.3. Return Type Copy linkLink copied to clipboard!
Object
58.1.2.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.2.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. |
|
| 0 | An unexpected error response. |
58.1.2.6. Samples Copy linkLink copied to clipboard!
58.1.3. DeletePermissionSet Copy linkLink copied to clipboard!
DELETE /v1/permissionsets/{id}
58.1.3.1. Description Copy linkLink copied to clipboard!
58.1.3.2. Parameters Copy linkLink copied to clipboard!
58.1.3.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| id | X | null |
58.1.3.3. Return Type Copy linkLink copied to clipboard!
Object
58.1.3.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.3.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. |
|
| 0 | An unexpected error response. |
58.1.3.6. Samples Copy linkLink copied to clipboard!
58.1.4. DeleteRole Copy linkLink copied to clipboard!
DELETE /v1/roles/{id}
58.1.4.1. Description Copy linkLink copied to clipboard!
58.1.4.2. Parameters Copy linkLink copied to clipboard!
58.1.4.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| id | X | null |
58.1.4.3. Return Type Copy linkLink copied to clipboard!
Object
58.1.4.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.4.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. |
|
| 0 | An unexpected error response. |
58.1.4.6. Samples Copy linkLink copied to clipboard!
58.1.5. DeleteSimpleAccessScope Copy linkLink copied to clipboard!
DELETE /v1/simpleaccessscopes/{id}
58.1.5.1. Description Copy linkLink copied to clipboard!
58.1.5.2. Parameters Copy linkLink copied to clipboard!
58.1.5.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| id | X | null |
58.1.5.3. Return Type Copy linkLink copied to clipboard!
Object
58.1.5.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.5.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. |
|
| 0 | An unexpected error response. |
58.1.5.6. Samples Copy linkLink copied to clipboard!
58.1.6. GetClustersForPermissions Copy linkLink copied to clipboard!
GET /v1/sac/clusters
GetClustersForPermissions
58.1.6.1. Description Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
58.1.6.2.1. Query Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| 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 |
| - | null |
58.1.6.3. Return Type Copy linkLink copied to clipboard!
58.1.6.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.6.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.6.6. Samples Copy linkLink copied to clipboard!
58.1.7. GetMyPermissions Copy linkLink copied to clipboard!
GET /v1/mypermissions
58.1.7.1. Description Copy linkLink copied to clipboard!
58.1.7.2. Parameters Copy linkLink copied to clipboard!
58.1.7.3. Return Type Copy linkLink copied to clipboard!
58.1.7.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.7.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.7.6. Samples Copy linkLink copied to clipboard!
58.1.8. GetNamespacesForClusterAndPermissions Copy linkLink copied to clipboard!
GET /v1/sac/clusters/{clusterId}/namespaces
GetNamespacesForClusterAndPermissions
58.1.8.1. Description Copy linkLink copied to clipboard!
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 Copy linkLink copied to clipboard!
58.1.8.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| clusterId | X | null |
58.1.8.2.2. Query Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| permissions |
| - | null |
58.1.8.3. Return Type Copy linkLink copied to clipboard!
58.1.8.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.8.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.8.6. Samples Copy linkLink copied to clipboard!
58.1.9. GetPermissionSet Copy linkLink copied to clipboard!
GET /v1/permissionsets/{id}
58.1.9.1. Description Copy linkLink copied to clipboard!
58.1.9.2. Parameters Copy linkLink copied to clipboard!
58.1.9.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| id | X | null |
58.1.9.3. Return Type Copy linkLink copied to clipboard!
58.1.9.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.9.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.9.6. Samples Copy linkLink copied to clipboard!
58.1.10. GetResources Copy linkLink copied to clipboard!
GET /v1/resources
58.1.10.1. Description Copy linkLink copied to clipboard!
58.1.10.2. Parameters Copy linkLink copied to clipboard!
58.1.10.3. Return Type Copy linkLink copied to clipboard!
58.1.10.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.10.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.10.6. Samples Copy linkLink copied to clipboard!
58.1.11. GetRole Copy linkLink copied to clipboard!
GET /v1/roles/{id}
58.1.11.1. Description Copy linkLink copied to clipboard!
58.1.11.2. Parameters Copy linkLink copied to clipboard!
58.1.11.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| id | X | null |
58.1.11.3. Return Type Copy linkLink copied to clipboard!
58.1.11.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.11.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.11.6. Samples Copy linkLink copied to clipboard!
58.1.12. GetRoles Copy linkLink copied to clipboard!
GET /v1/roles
58.1.12.1. Description Copy linkLink copied to clipboard!
58.1.12.2. Parameters Copy linkLink copied to clipboard!
58.1.12.3. Return Type Copy linkLink copied to clipboard!
58.1.12.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.12.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.12.6. Samples Copy linkLink copied to clipboard!
58.1.13. GetSimpleAccessScope Copy linkLink copied to clipboard!
GET /v1/simpleaccessscopes/{id}
58.1.13.1. Description Copy linkLink copied to clipboard!
58.1.13.2. Parameters Copy linkLink copied to clipboard!
58.1.13.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| id | X | null |
58.1.13.3. Return Type Copy linkLink copied to clipboard!
58.1.13.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.13.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.13.6. Samples Copy linkLink copied to clipboard!
58.1.14. ListPermissionSets Copy linkLink copied to clipboard!
GET /v1/permissionsets
58.1.14.1. Description Copy linkLink copied to clipboard!
58.1.14.2. Parameters Copy linkLink copied to clipboard!
58.1.14.3. Return Type Copy linkLink copied to clipboard!
58.1.14.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.14.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.14.6. Samples Copy linkLink copied to clipboard!
58.1.15. ListSimpleAccessScopes Copy linkLink copied to clipboard!
GET /v1/simpleaccessscopes
58.1.15.1. Description Copy linkLink copied to clipboard!
58.1.15.2. Parameters Copy linkLink copied to clipboard!
58.1.15.3. Return Type Copy linkLink copied to clipboard!
58.1.15.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.15.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.15.6. Samples Copy linkLink copied to clipboard!
58.1.16. PostPermissionSet Copy linkLink copied to clipboard!
POST /v1/permissionsets
PostPermissionSet
58.1.16.1. Description Copy linkLink copied to clipboard!
PermissionSet.id is disallowed in request and set in response.
58.1.16.2. Parameters Copy linkLink copied to clipboard!
58.1.16.2.1. Body Parameter Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| body | This encodes a set of permissions for StackRox resources. StoragePermissionSet | X |
58.1.16.3. Return Type Copy linkLink copied to clipboard!
58.1.16.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.16.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.16.6. Samples Copy linkLink copied to clipboard!
58.1.17. PostSimpleAccessScope Copy linkLink copied to clipboard!
POST /v1/simpleaccessscopes
PostSimpleAccessScope
58.1.17.1. Description Copy linkLink copied to clipboard!
SimpleAccessScope.id is disallowed in request and set in response.
58.1.17.2. Parameters Copy linkLink copied to clipboard!
58.1.17.2.1. Body Parameter Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| 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 Copy linkLink copied to clipboard!
58.1.17.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.17.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. | |
| 0 | An unexpected error response. |
58.1.17.6. Samples Copy linkLink copied to clipboard!
58.1.18. PutPermissionSet Copy linkLink copied to clipboard!
PUT /v1/permissionsets/{id}
58.1.18.1. Description Copy linkLink copied to clipboard!
58.1.18.2. Parameters Copy linkLink copied to clipboard!
58.1.18.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| id | id is generated and cannot be changed. | X | null |
58.1.18.2.2. Body Parameter Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| body | X |
58.1.18.3. Return Type Copy linkLink copied to clipboard!
Object
58.1.18.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.18.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. |
|
| 0 | An unexpected error response. |
58.1.18.6. Samples Copy linkLink copied to clipboard!
58.1.19. PutSimpleAccessScope Copy linkLink copied to clipboard!
PUT /v1/simpleaccessscopes/{id}
58.1.19.1. Description Copy linkLink copied to clipboard!
58.1.19.2. Parameters Copy linkLink copied to clipboard!
58.1.19.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| id |
| X | null |
58.1.19.2.2. Body Parameter Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| body | X |
58.1.19.3. Return Type Copy linkLink copied to clipboard!
Object
58.1.19.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.19.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. |
|
| 0 | An unexpected error response. |
58.1.19.6. Samples Copy linkLink copied to clipboard!
58.1.20. UpdateRole Copy linkLink copied to clipboard!
PUT /v1/roles/{name}
58.1.20.1. Description Copy linkLink copied to clipboard!
58.1.20.2. Parameters Copy linkLink copied to clipboard!
58.1.20.2.1. Path Parameters Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| name |
| X | null |
58.1.20.2.2. Body Parameter Copy linkLink copied to clipboard!
| Name | Description | Required | Default | Pattern |
|---|---|---|---|---|
| body | X |
58.1.20.3. Return Type Copy linkLink copied to clipboard!
Object
58.1.20.4. Content Type Copy linkLink copied to clipboard!
- application/json
58.1.20.5. Responses Copy linkLink copied to clipboard!
| Code | Message | Datatype |
|---|---|---|
| 200 | A successful response. |
|
| 0 | An unexpected error response. |