feat(governance): serve members, access policies and denials (#2023)
This commit is contained in:
16 files changed
+1531
-14
No files matched your search
@@ -1,5 +1,26 @@
|
||||
components:
|
||||
schemas:
|
||||
AddMemberInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
display_name:
|
||||
description: Name shown for a new person; defaults to the email or subject
|
||||
type: string
|
||||
email:
|
||||
description: The person's email; give this or a subject
|
||||
type: string
|
||||
role:
|
||||
description: The role to hold
|
||||
type: string
|
||||
subject:
|
||||
description: The subject the identity provider asserts; give this or an email
|
||||
type: string
|
||||
workspace:
|
||||
description: Scope the membership to this workspace; empty is organisation-wide
|
||||
type: string
|
||||
required:
|
||||
- role
|
||||
type: object
|
||||
AnswerInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -1286,6 +1307,60 @@ components:
|
||||
- id
|
||||
- token
|
||||
type: object
|
||||
GovernanceDenial:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
action:
|
||||
type: string
|
||||
at:
|
||||
format: date-time
|
||||
type: string
|
||||
count:
|
||||
format: int64
|
||||
type: integer
|
||||
kind:
|
||||
type: string
|
||||
level:
|
||||
type: string
|
||||
org:
|
||||
type: string
|
||||
policies:
|
||||
items:
|
||||
type: string
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
principal:
|
||||
type: string
|
||||
resource:
|
||||
type: string
|
||||
required:
|
||||
- principal
|
||||
- org
|
||||
- action
|
||||
- kind
|
||||
- resource
|
||||
- level
|
||||
- policies
|
||||
- at
|
||||
- count
|
||||
type: object
|
||||
GovernanceDenialsBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
denials:
|
||||
items:
|
||||
$ref: "#/components/schemas/GovernanceDenial"
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
more:
|
||||
description: Whether older refusals match beyond this page
|
||||
type: boolean
|
||||
required:
|
||||
- denials
|
||||
- more
|
||||
type: object
|
||||
GovernanceIdentity:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -1327,6 +1402,67 @@ components:
|
||||
- url
|
||||
- expires_at
|
||||
type: object
|
||||
GovernanceMember:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
display_name:
|
||||
type: string
|
||||
identity_id:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
last_sign_in:
|
||||
format: date-time
|
||||
type: string
|
||||
role:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
workspace_id:
|
||||
type: string
|
||||
required:
|
||||
- identity_id
|
||||
- kind
|
||||
- display_name
|
||||
- role
|
||||
- status
|
||||
type: object
|
||||
GovernanceMembersBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
members:
|
||||
items:
|
||||
$ref: "#/components/schemas/GovernanceMember"
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
required:
|
||||
- members
|
||||
type: object
|
||||
GovernanceMembership:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
identity_id:
|
||||
type: string
|
||||
org_id:
|
||||
type: string
|
||||
role:
|
||||
type: string
|
||||
workspace_id:
|
||||
type: string
|
||||
required:
|
||||
- identity_id
|
||||
- org_id
|
||||
- role
|
||||
type: object
|
||||
GovernanceMembershipBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
membership:
|
||||
$ref: "#/components/schemas/GovernanceMembership"
|
||||
required:
|
||||
- membership
|
||||
type: object
|
||||
GovernanceModel:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -1505,6 +1641,58 @@ components:
|
||||
- expires_at
|
||||
- last_used_at
|
||||
type: object
|
||||
GovernancePoliciesBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
policies:
|
||||
items:
|
||||
$ref: "#/components/schemas/GovernancePolicy"
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
shipped:
|
||||
description: IDs of the policies Archie ships, which a reset restores
|
||||
items:
|
||||
type: string
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
required:
|
||||
- policies
|
||||
- shipped
|
||||
type: object
|
||||
GovernancePolicy:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
level:
|
||||
type: string
|
||||
object_id:
|
||||
type: string
|
||||
object_kind:
|
||||
type: string
|
||||
org_id:
|
||||
type: string
|
||||
text:
|
||||
type: string
|
||||
workspace_id:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- level
|
||||
- text
|
||||
type: object
|
||||
GovernancePolicyVersionBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
version:
|
||||
description: The policy chain's new revision
|
||||
format: int64
|
||||
type: integer
|
||||
required:
|
||||
- version
|
||||
type: object
|
||||
GovernanceRegistration:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -2855,6 +3043,18 @@ components:
|
||||
required:
|
||||
- text
|
||||
type: object
|
||||
SetMemberInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
role:
|
||||
description: The role to hold
|
||||
type: string
|
||||
workspace:
|
||||
description: Scope the membership to this workspace; empty is organisation-wide
|
||||
type: string
|
||||
required:
|
||||
- role
|
||||
type: object
|
||||
SignInInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -2946,6 +3146,147 @@ info:
|
||||
version: dev
|
||||
openapi: 3.1.0
|
||||
paths:
|
||||
/api/access/denials:
|
||||
get:
|
||||
operationId: list-access-denials
|
||||
parameters:
|
||||
- description: Only refusals of this identity
|
||||
explode: false
|
||||
in: query
|
||||
name: principal
|
||||
schema:
|
||||
description: Only refusals of this identity
|
||||
type: string
|
||||
- description: Only refusals of this action
|
||||
explode: false
|
||||
in: query
|
||||
name: action
|
||||
schema:
|
||||
description: Only refusals of this action
|
||||
type: string
|
||||
- description: Only refusals on this resource kind
|
||||
explode: false
|
||||
in: query
|
||||
name: kind
|
||||
schema:
|
||||
description: Only refusals on this resource kind
|
||||
type: string
|
||||
- description: Only refusals first recorded at or after this time
|
||||
explode: false
|
||||
in: query
|
||||
name: since
|
||||
schema:
|
||||
description: Only refusals first recorded at or after this time
|
||||
format: date-time
|
||||
type: string
|
||||
- description: Only refusals first recorded before this time
|
||||
explode: false
|
||||
in: query
|
||||
name: until
|
||||
schema:
|
||||
description: Only refusals first recorded before this time
|
||||
format: date-time
|
||||
type: string
|
||||
- description: How many refusals to return
|
||||
explode: false
|
||||
in: query
|
||||
name: limit
|
||||
schema:
|
||||
default: 100
|
||||
description: How many refusals to return
|
||||
format: int64
|
||||
maximum: 1000
|
||||
minimum: 1
|
||||
type: integer
|
||||
- description: How many of the newest matching refusals to skip
|
||||
explode: false
|
||||
in: query
|
||||
name: offset
|
||||
schema:
|
||||
default: 0
|
||||
description: How many of the newest matching refusals to skip
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GovernanceDenialsBody"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List the requests access policies refused
|
||||
tags:
|
||||
- Access
|
||||
/api/access/policies:
|
||||
delete:
|
||||
operationId: delete-access-policy
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GovernancePolicy"
|
||||
required: true
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Delete an access policy
|
||||
tags:
|
||||
- Access
|
||||
get:
|
||||
operationId: list-access-policies
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GovernancePoliciesBody"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List the organisation's access policies
|
||||
tags:
|
||||
- Access
|
||||
put:
|
||||
operationId: put-access-policy
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GovernancePolicy"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GovernancePolicyVersionBody"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Create or replace an access policy
|
||||
tags:
|
||||
- Access
|
||||
/api/account/channels:
|
||||
get:
|
||||
operationId: list-channel-links
|
||||
@@ -5084,6 +5425,201 @@ paths:
|
||||
summary: List the organisation's name changes
|
||||
tags:
|
||||
- Organisations
|
||||
/api/orgs/{id}/members:
|
||||
get:
|
||||
operationId: list-org-members
|
||||
parameters:
|
||||
- description: Organisation ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: Organisation ID
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GovernanceMembersBody"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List an organisation's members
|
||||
tags:
|
||||
- Access
|
||||
post:
|
||||
operationId: add-org-member
|
||||
parameters:
|
||||
- description: Organisation ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: Organisation ID
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/AddMemberInputBody"
|
||||
required: true
|
||||
responses:
|
||||
"201":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GovernanceMembershipBody"
|
||||
description: Created
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Add a person by email or provider subject
|
||||
tags:
|
||||
- Access
|
||||
/api/orgs/{id}/members/{identity}:
|
||||
delete:
|
||||
operationId: remove-org-member
|
||||
parameters:
|
||||
- description: Organisation ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: Organisation ID
|
||||
type: string
|
||||
- description: Identity ID of the member
|
||||
in: path
|
||||
name: identity
|
||||
required: true
|
||||
schema:
|
||||
description: Identity ID of the member
|
||||
type: string
|
||||
- description: Remove the membership scoped to this workspace; empty removes the organisation-wide one
|
||||
explode: false
|
||||
in: query
|
||||
name: workspace
|
||||
schema:
|
||||
description: Remove the membership scoped to this workspace; empty removes the organisation-wide one
|
||||
type: string
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Remove a membership
|
||||
tags:
|
||||
- Access
|
||||
put:
|
||||
operationId: set-org-member
|
||||
parameters:
|
||||
- description: Organisation ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: Organisation ID
|
||||
type: string
|
||||
- description: Identity ID of the member
|
||||
in: path
|
||||
name: identity
|
||||
required: true
|
||||
schema:
|
||||
description: Identity ID of the member
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SetMemberInputBody"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/GovernanceMembershipBody"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Give a member a role
|
||||
tags:
|
||||
- Access
|
||||
/api/orgs/{id}/members/{identity}/reactivate:
|
||||
post:
|
||||
operationId: reactivate-org-member
|
||||
parameters:
|
||||
- description: Organisation ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: Organisation ID
|
||||
type: string
|
||||
- description: Identity ID of the member
|
||||
in: path
|
||||
name: identity
|
||||
required: true
|
||||
schema:
|
||||
description: Identity ID of the member
|
||||
type: string
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Reactivate a member's identity
|
||||
tags:
|
||||
- Access
|
||||
/api/orgs/{id}/members/{identity}/suspend:
|
||||
post:
|
||||
operationId: suspend-org-member
|
||||
parameters:
|
||||
- description: Organisation ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
description: Organisation ID
|
||||
type: string
|
||||
- description: Identity ID of the member
|
||||
in: path
|
||||
name: identity
|
||||
required: true
|
||||
schema:
|
||||
description: Identity ID of the member
|
||||
type: string
|
||||
responses:
|
||||
"204":
|
||||
description: No Content
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Suspend a member's identity
|
||||
tags:
|
||||
- Access
|
||||
/api/orgs/{id}/workspaces:
|
||||
get:
|
||||
operationId: list-org-workspaces
|
||||
|
||||
Reference in new issue
Block a user