The HPE GreenLake for Authorization API provides a unified way to manage the authorization function for HPE GreenLake cloud.
HPE GreenLake for Authorization API (1.0.0-beta)
https://global.api.greenlake.hpe.com/
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/
Roles
Roles are created in a Workspace, typically by an IAM administrator. They may be created by a Resource Provider (RP) if the RP has been granted the required privileges in the Workspace.
Requirements
- Roles must include at least one inline permission.
- There is a max limit of 100 Roles per workspace (in addition to the global predefined roles).
Friendly name for user interface. Allowed char set is [a-z A-Z 0-9 -(dash) (space)]
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/roles
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X POST \
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Storage Limited Admin"
}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "authorization/role", "slug": "", "name": "Storage Limited Admin", "description": "Storage Limited Admin", "releaseStage": "", "kind": "CUSTOM", "generation": 1, "grn": "grn:glp/workspaces/428466023dbe11eeb7837e8589f701ca/regions/default/providers/authorization/custom-roles/123e4567-e89b-12d3-a456-426614174002", "createdAt": "2023-04-06T22:45:59.759943+00:00", "updatedAt": "2023-04-06T22:45:59.759943+00:00" }
Request
Retrieves role by applying OData 4.0 filters. Use the filter parameter to provide a filter string. Supports in operator on kind and grn attributes.
Example Request: /authorization/v1beta1/roles?filter=kind in ('PREDEFINED')
Note:
- No duplicate attributes in OData filter: Each attribute (kind, grn) can only appear once in the OData filter expression. Multiple occurrences will result in a 400 Bad Request error.
- Supported operators: Only in operator is supported.
OData style filter for filtering roles. Supports in operator on kind and grn attributes.
Sort results by a single attribute and allow setting a sorting direction as ascending (asc). Sorting is valid only for the slug and name attributes. If omitted, default sorting direction is ascending and default sorting attribute is name.
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/roles
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'OK
Friendly name for user interface. Allowed char set is [a-z A-Z 0-9 -(dash) (space)]
Empty for CUSTOM roles. Unique name for PREDEFINED roles and the pattern is provider name followed by the actual name (i.e. <providerName>.<name>).
{ "items": [ { … } ], "count": 1, "total": 1, "offset": 0 }
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/roles/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'OK
Friendly name for user interface. Allowed char set is [a-z A-Z 0-9 -(dash) (space)]
Empty for CUSTOM roles. Unique name for PREDEFINED roles and the pattern is provider name followed by the actual name (i.e. <providerName>.<name>).
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "source": "LOCAL", "type": "authorization/role", "slug": "", "name": "Storage Limited Admin", "description": "Storage Limited Admin", "releaseStage": "", "kind": "CUSTOM", "generation": 1, "grn": "grn:glp/workspaces/428466023dbe11eeb7837e8589f701ca/regions/default/providers/authorization/custom-roles/123e4567-e89b-12d3-a456-426614174002", "createdAt": "2023-04-06T22:45:59.759943+00:00", "updatedAt": "2023-04-06T22:45:59.759943+00:00" }
Friendly name for user interface. Allowed char set is [a-z A-Z 0-9 -(dash) (space)]
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/roles/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X PUT \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "Storage Limited Admin"
}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "authorization/role", "slug": "", "name": "Storage Limited Admin", "description": "Storage Limited Admin", "releaseStage": "", "kind": "CUSTOM", "generation": 1, "grn": "grn:glp/workspaces/428466023dbe11eeb7837e8589f701ca/regions/default/providers/authorization/custom-roles/123e4567-e89b-12d3-a456-426614174002", "createdAt": "2023-04-06T22:45:59.759943+00:00", "updatedAt": "2023-04-06T22:45:59.759943+00:00" }
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/roles/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X DELETE \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}/permissions
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/roles/{id}/permissions
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}/permissions' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "items": [ { … } ], "count": 1, "total": 1, "offset": 0 }
Request
Use to add items to a role permission list. This operation is synchronous and non-atomic. 'Note: For assistance finding the permission identifiers, see the developer guide.'
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}/permissions/batch
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/roles/{id}/permissions/batch
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X POST \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}/permissions/batch' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"id": "compute.server.edit"
}
]
}'OK
A unique machine-friendly identifier for the error from a global list of enumerated identifier strings.
A user-friendly error message
{ "successCount": 1, "errorCount": 1, "successes": [ { … } ], "errors": [ { … } ] }
https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}/permissions/bulk
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/roles/{id}/permissions/bulk
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X DELETE \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/roles/{id}/permissions/bulk' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"id": "compute.server.edit"
}
]
}'OK
A unique machine-friendly identifier for the error from a global list of enumerated identifier strings.
A user-friendly error message
{ "successCount": 1, "errorCount": 1, "successes": [ { … } ], "errors": [ { … } ] }
Role Assignments
Role assignments are composed of three pieces (principal, role, and scope). Role assigments associate a user, group, or service (principal) with a specific role (along with its permissions) at a particular scope (a resource or group of resources) to grant them access and specify their responsibilities within HPE GreenLake.
Note: There is a maximum limit of 50 role assignments per user per workspace.