openapi: 3.0.0
info:
title: OpenStorage SDK OpenStorageAlerts OpenStorageRole API
version: 0.186.0
security:
- bearerAuth: []
tags:
- name: OpenStorageRole
paths:
/v1/roles:
get:
operationId: OpenStorageRole_Enumerate
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkRoleEnumerateResponse'
description: A successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/runtimeError'
description: An unexpected error response.
summary: List all roles
tags:
- OpenStorageRole
post:
operationId: OpenStorageRole_Create
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkRoleCreateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkRoleCreateResponse'
description: A successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/runtimeError'
description: An unexpected error response.
summary: Create a role for users in the system
tags:
- OpenStorageRole
put:
operationId: OpenStorageRole_Update
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkRoleUpdateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkRoleUpdateResponse'
description: A successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/runtimeError'
description: An unexpected error response.
summary: Update an existing role
tags:
- OpenStorageRole
/v1/roles/inspect/{name}:
get:
operationId: OpenStorageRole_Inspect
parameters:
- description: Name of role
in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkRoleInspectResponse'
description: A successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/runtimeError'
description: An unexpected error response.
summary: Get information about a role
tags:
- OpenStorageRole
/v1/roles/{name}:
delete:
operationId: OpenStorageRole_Delete
parameters:
- in: path
name: name
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/apiSdkRoleDeleteResponse'
description: A successful response.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/runtimeError'
description: An unexpected error response.
summary: Delete an existing role
tags:
- OpenStorageRole
components:
schemas:
apiSdkRoleUpdateResponse:
properties:
role:
$ref: '#/components/schemas/apiSdkRole'
title: Response contains information about the updated role
type: object
apiSdkRoleUpdateRequest:
properties:
role:
$ref: '#/components/schemas/apiSdkRole'
title: Defines a request to update an existing role
type: object
protobufAny:
properties:
type_url:
type: string
value:
format: byte
type: string
type: object
apiSdkRule:
description: "SdkRule is the message used to construct custom roles in the OpenStorage SDK.\n\n### Format\nThe following shows the supported format for SdkRule:\n\n* Services: Is the gRPC service name in `OpenStorage<service name>` in lowercase\n* Apis: Is the API name in the service in lowercase\n\nValues can also be set to `*`, or start or end with `*` to allow multiple matches in services or apis.\n\nServices and APIs can also be denied by prefixing the value with a `!`. Note that on rule conflicts,\ndenial will always be chosen.\n\n### Examples\n\n* Allow any call:\n\n```yaml\nSdkRule:\n - Services: [\"*\"]\n Apis: [\"*\"]\n```\n\n* Allow only cluster operations:\n\n```yaml\nSdkRule:\n - services: [\"cluster\"]\n apis: [\"*\"]\n```\n\n* Allow inspection of any object and listings of only volumes\n\n```yaml\nSdkRule:\n - Services: [\"volumes\"]\n Apis: [\"*enumerate*\"]\n - Services: [\"*\"]\n Apis: [\"inspect*\"]\n```\n\n* Allow all volume call except create\n\n```yaml\nSdkRule:\n - Services: [\"volumes\"]\n Apis: [\"*\", \"!create\"]\n```"
properties:
apis:
items:
type: string
title: The API name in the service in lowercase
type: array
services:
items:
type: string
title: The gRPC service name in `OpenStorage<service name>` in lowercase
type: array
type: object
apiSdkRoleDeleteResponse:
title: Empty response
type: object
apiSdkRoleEnumerateResponse:
properties:
names:
items:
type: string
title: List of role names
type: array
title: Respose to enumerate all roles
type: object
apiSdkRole:
properties:
name:
type: string
rules:
items:
$ref: '#/components/schemas/apiSdkRule'
type: array
type: object
runtimeError:
properties:
code:
format: int32
type: integer
details:
items:
$ref: '#/components/schemas/protobufAny'
type: array
error:
type: string
message:
type: string
type: object
apiSdkRoleInspectResponse:
properties:
role:
$ref: '#/components/schemas/apiSdkRole'
title: Response to inspection request
type: object
apiSdkRoleCreateRequest:
properties:
role:
$ref: '#/components/schemas/apiSdkRole'
title: Defines a request for creating a role
type: object
apiSdkRoleCreateResponse:
properties:
role:
$ref: '#/components/schemas/apiSdkRole'
title: Response contains informaiton about the creation of the role
type: object
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT