feat(connectors): separate packages from scoped installations (#2027)
Packages are accepted once by the instance. Installations configure them at the instance, an organisation or a person; bindings and credentials resolve the person's, then their organisation's, then the instance's. Decisions, approval requests and held chat actions record the installation and scope that acted. The dashboard lists packages separately from installations, shows every installation's scope, and creates, edits and disables installations at their scope.
This commit is contained in:
57 files changed
+3358
-1264
No files matched your search
+356
-8
@@ -559,6 +559,13 @@ components:
|
||||
type: object
|
||||
kind:
|
||||
type: string
|
||||
scope:
|
||||
description: "Who owns the credential. Default: instance"
|
||||
enum:
|
||||
- instance
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- fields
|
||||
@@ -576,9 +583,16 @@ components:
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
scope:
|
||||
enum:
|
||||
- instance
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- kind
|
||||
- scope
|
||||
- restarted
|
||||
type: object
|
||||
ConnectorsCredentialView:
|
||||
@@ -592,9 +606,16 @@ components:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
scope:
|
||||
enum:
|
||||
- instance
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- kind
|
||||
- scope
|
||||
- fields
|
||||
type: object
|
||||
ConnectorsEffect:
|
||||
@@ -618,6 +639,9 @@ components:
|
||||
ConnectorsExtensionKind:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
contract:
|
||||
description: The package contract this kind accepts
|
||||
type: string
|
||||
group:
|
||||
enum:
|
||||
- platform
|
||||
@@ -633,6 +657,7 @@ components:
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- contract
|
||||
- label
|
||||
- singular
|
||||
- group
|
||||
@@ -648,6 +673,15 @@ components:
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
can_override:
|
||||
items:
|
||||
enum:
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
can_rollback:
|
||||
type: boolean
|
||||
capabilities:
|
||||
@@ -666,6 +700,8 @@ components:
|
||||
type: string
|
||||
display_name:
|
||||
type: string
|
||||
editable:
|
||||
type: boolean
|
||||
effects:
|
||||
$ref: "#/components/schemas/ConnectorsServerEffects"
|
||||
egress:
|
||||
@@ -690,14 +726,37 @@ components:
|
||||
- integration
|
||||
- agent
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
managed:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
overridden:
|
||||
type: boolean
|
||||
overridden_by:
|
||||
items:
|
||||
enum:
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
owner_id:
|
||||
type: string
|
||||
package:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
pending:
|
||||
$ref: "#/components/schemas/ConnectorsPendingView"
|
||||
scope:
|
||||
enum:
|
||||
- instance
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
settings:
|
||||
additionalProperties:
|
||||
type: string
|
||||
@@ -718,7 +777,12 @@ components:
|
||||
version:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- package
|
||||
- scope
|
||||
- editable
|
||||
- overridden
|
||||
- contract
|
||||
- group
|
||||
- state
|
||||
@@ -784,13 +848,83 @@ components:
|
||||
- "null"
|
||||
healthy:
|
||||
type: boolean
|
||||
id:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
scope:
|
||||
enum:
|
||||
- instance
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- scope
|
||||
- contract
|
||||
- healthy
|
||||
type: object
|
||||
ConnectorsInstallation:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
scope:
|
||||
enum:
|
||||
- instance
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- scope
|
||||
type: object
|
||||
ConnectorsInstallationRequest:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
args:
|
||||
items:
|
||||
type: string
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
credentials:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: Each credential slot and the credential, by name, that fills it
|
||||
type: object
|
||||
egress:
|
||||
description: Every host the extension may reach. An installation below the instance must name them, unless the package runs unconfined
|
||||
items:
|
||||
type: string
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
enabled:
|
||||
type: boolean
|
||||
env:
|
||||
description: Host environment variables the extension may see; the instance's installations of the package bound them
|
||||
items:
|
||||
type: string
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
settings:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
tools:
|
||||
items:
|
||||
$ref: "#/components/schemas/ConnectorsToolDecl"
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
url:
|
||||
type: string
|
||||
required:
|
||||
- enabled
|
||||
type: object
|
||||
ConnectorsLifecycle:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -870,6 +1004,47 @@ components:
|
||||
- name
|
||||
- state
|
||||
type: object
|
||||
ConnectorsPackageView:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
accepted_at:
|
||||
format: date-time
|
||||
type: string
|
||||
contract:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
digest:
|
||||
type: string
|
||||
display_name:
|
||||
type: string
|
||||
group:
|
||||
enum:
|
||||
- platform
|
||||
- integration
|
||||
- agent
|
||||
type: string
|
||||
id:
|
||||
type: string
|
||||
installed:
|
||||
description: Whether the instance accepted the package's grants, so an organisation or a person can install it
|
||||
type: boolean
|
||||
managed:
|
||||
type: boolean
|
||||
name:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
- contract
|
||||
- group
|
||||
- digest
|
||||
- managed
|
||||
- installed
|
||||
- accepted_at
|
||||
type: object
|
||||
ConnectorsPendingView:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -1003,6 +1178,26 @@ components:
|
||||
- source
|
||||
- name
|
||||
type: object
|
||||
CreateInstallationInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
name:
|
||||
description: "What a binding calls the installation. Default: the package's name"
|
||||
type: string
|
||||
package:
|
||||
description: The accepted package to install
|
||||
type: string
|
||||
scope:
|
||||
description: "Who owns the installation: the instance, the caller's organisation or the caller"
|
||||
enum:
|
||||
- instance
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
required:
|
||||
- package
|
||||
- scope
|
||||
type: object
|
||||
CreateTokenInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -2569,12 +2764,15 @@ components:
|
||||
effect:
|
||||
$ref: "#/components/schemas/ConnectorsEffect"
|
||||
input: {}
|
||||
installation:
|
||||
$ref: "#/components/schemas/ConnectorsInstallation"
|
||||
name:
|
||||
type: string
|
||||
target:
|
||||
$ref: "#/components/schemas/ConnectorsTarget"
|
||||
required:
|
||||
- connector
|
||||
- installation
|
||||
- name
|
||||
- input
|
||||
- digest
|
||||
@@ -3152,6 +3350,22 @@ components:
|
||||
required:
|
||||
- versions
|
||||
type: object
|
||||
OverrideInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
"off":
|
||||
description: True switches the inherited installation off; false restores it
|
||||
type: boolean
|
||||
scope:
|
||||
description: Switch it off for the caller's organisation or for the caller
|
||||
enum:
|
||||
- org
|
||||
- person
|
||||
type: string
|
||||
required:
|
||||
- scope
|
||||
- "off"
|
||||
type: object
|
||||
PolicyInputBody:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
@@ -5494,7 +5708,7 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List accepted connectors
|
||||
summary: List the connectors the caller can use
|
||||
tags:
|
||||
- Connectors
|
||||
/api/connectors/{name}:
|
||||
@@ -5620,7 +5834,7 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List credentials, never their values
|
||||
summary: List the credentials the caller can see, never their values
|
||||
tags:
|
||||
- Credentials
|
||||
/api/credentials/{name}:
|
||||
@@ -5645,7 +5859,7 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Get a credential, never its values
|
||||
summary: Get the credential a name resolves to for the caller, never its values
|
||||
tags:
|
||||
- Credentials
|
||||
put:
|
||||
@@ -5677,7 +5891,7 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Store a credential sealed and restart what uses it
|
||||
summary: Store a credential sealed at a scope and restart what uses it
|
||||
tags:
|
||||
- Credentials
|
||||
/api/drafts:
|
||||
@@ -6035,7 +6249,7 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List every accepted package, whatever its contract
|
||||
summary: List every installation the caller can see, whatever its contract and scope
|
||||
tags:
|
||||
- Extensions
|
||||
/api/extensions/catalogue:
|
||||
@@ -6421,7 +6635,7 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List accepted guards
|
||||
summary: List the guards the caller can use
|
||||
tags:
|
||||
- Guards
|
||||
/api/guards/{name}:
|
||||
@@ -6481,6 +6695,117 @@ paths:
|
||||
summary: Accept a package and start it
|
||||
tags:
|
||||
- Guards
|
||||
/api/installations:
|
||||
post:
|
||||
operationId: create-installation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CreateInstallationInputBody"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ConnectorsExtensionView"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Install an accepted package at the instance, the caller's organisation or the caller
|
||||
tags:
|
||||
- Installations
|
||||
/api/installations/{id}:
|
||||
delete:
|
||||
operationId: remove-installation
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ConnectorsPackageState"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Remove an installation; its package stays accepted
|
||||
tags:
|
||||
- Installations
|
||||
put:
|
||||
operationId: update-installation
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ConnectorsInstallationRequest"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ConnectorsExtensionView"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Change an installation's configuration and restart it
|
||||
tags:
|
||||
- Installations
|
||||
/api/installations/{id}/override:
|
||||
put:
|
||||
operationId: put-installation-override
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/OverrideInputBody"
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ConnectorsPackageState"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: Switch an inherited installation off or on for the caller's organisation or the caller
|
||||
tags:
|
||||
- Installations
|
||||
/api/mappings:
|
||||
get:
|
||||
operationId: list-mappings
|
||||
@@ -6647,7 +6972,7 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List accepted MCP servers
|
||||
summary: List the MCP servers the caller can use
|
||||
tags:
|
||||
- MCP servers
|
||||
/api/mcp-servers/{name}:
|
||||
@@ -7492,6 +7817,29 @@ paths:
|
||||
summary: Rename a workspace
|
||||
tags:
|
||||
- Organisations
|
||||
/api/packages:
|
||||
get:
|
||||
operationId: list-packages
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
items:
|
||||
$ref: "#/components/schemas/ConnectorsPackageView"
|
||||
type:
|
||||
- array
|
||||
- "null"
|
||||
description: OK
|
||||
default:
|
||||
content:
|
||||
application/problem+json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List the packages the instance accepted
|
||||
tags:
|
||||
- Installations
|
||||
/api/policies/change-request:
|
||||
get:
|
||||
operationId: get-change-request-rules
|
||||
@@ -7742,7 +8090,7 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorModel"
|
||||
description: Error
|
||||
summary: List accepted secret engines
|
||||
summary: List the secret engines the caller can use
|
||||
tags:
|
||||
- Secret engines
|
||||
/api/secret-engines/{name}:
|
||||
|
||||
Reference in new issue
Block a user