@@ -17,137 +17,142 @@ syntax = "proto3";
1717
1818package controlplane.v1 ;
1919
20- option go_package = "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1;v1" ;
21- import "validate/validate.proto" ;
22- import "google/protobuf/timestamp.proto" ;
23- import "google/protobuf/struct.proto" ;
2420import "controlplane/v1/response_messages.proto" ;
21+ import "google/protobuf/struct.proto" ;
22+ import "google/protobuf/timestamp.proto" ;
23+ import "validate/validate.proto" ;
24+
25+ option go_package = "github.com/chainloop-dev/chainloop/app/controlplane/api/controlplane/v1;v1" ;
2526
2627service IntegrationsService {
27- // Integrations available and loaded in the controlplane ready to be used during registration
28- rpc ListAvailable (IntegrationsServiceListAvailableRequest ) returns (IntegrationsServiceListAvailableResponse );
29-
30- // Registration Related operations
31- // Register a new integration in the organization
32- rpc Register (IntegrationsServiceRegisterRequest ) returns (IntegrationsServiceRegisterResponse );
33- // Delete registered integrations
34- rpc Deregister (IntegrationsServiceDeregisterRequest ) returns (IntegrationsServiceDeregisterResponse );
35- // List registered integrations
36- rpc ListRegistrations (IntegrationsServiceListRegistrationsRequest ) returns (IntegrationsServiceListRegistrationsResponse );
37- // View registered integration
38- rpc DescribeRegistration (IntegrationsServiceDescribeRegistrationRequest ) returns (IntegrationsServiceDescribeRegistrationResponse );
39-
40- // Attachment Related operations
41- // Attach an integration to a workflow
42- rpc Attach (IntegrationsServiceAttachRequest ) returns (IntegrationsServiceAttachResponse );
43- // Detach integration from a workflow
44- rpc Detach (IntegrationsServiceDetachRequest ) returns (IntegrationsServiceDetachResponse );
45- // List attachments
46- rpc ListAttachments (ListAttachmentsRequest ) returns (ListAttachmentsResponse );
28+ // Integrations available and loaded in the controlplane ready to be used during registration
29+ rpc ListAvailable (IntegrationsServiceListAvailableRequest ) returns (IntegrationsServiceListAvailableResponse );
30+
31+ // Registration Related operations
32+ // Register a new integration in the organization
33+ rpc Register (IntegrationsServiceRegisterRequest ) returns (IntegrationsServiceRegisterResponse );
34+ // Delete registered integrations
35+ rpc Deregister (IntegrationsServiceDeregisterRequest ) returns (IntegrationsServiceDeregisterResponse );
36+ // List registered integrations
37+ rpc ListRegistrations (IntegrationsServiceListRegistrationsRequest ) returns (IntegrationsServiceListRegistrationsResponse );
38+ // View registered integration
39+ rpc DescribeRegistration (IntegrationsServiceDescribeRegistrationRequest ) returns (IntegrationsServiceDescribeRegistrationResponse );
40+
41+ // Attachment Related operations
42+ // Attach an integration to a workflow
43+ rpc Attach (IntegrationsServiceAttachRequest ) returns (IntegrationsServiceAttachResponse );
44+ // Detach integration from a workflow
45+ rpc Detach (IntegrationsServiceDetachRequest ) returns (IntegrationsServiceDetachResponse );
46+ // List attachments
47+ rpc ListAttachments (ListAttachmentsRequest ) returns (ListAttachmentsResponse );
4748}
4849
4950message IntegrationsServiceRegisterRequest {
50- // Kind of integration to register
51- // This should match the ID of an existing plugin
52- string plugin_id = 1 [(validate.rules ) .string.min_len = 1 ];
53- // Arbitrary configuration for the integration
54- google.protobuf.Struct config = 3 [(validate.rules ) .message.required = true ];
55- // Description of the registration, used for display purposes
56- string description = 4 ;
51+ // unique, DNS-like name for the registration
52+ string name = 5 [(validate.rules ).string = {min_len : 1 }];
53+ // Kind of integration to register
54+ // This should match the ID of an existing plugin
55+ string plugin_id = 1 [(validate.rules ) .string.min_len = 1 ];
56+ // Arbitrary configuration for the integration
57+ google.protobuf.Struct config = 3 [(validate.rules ) .message.required = true ];
58+ // Description of the registration, used for display purposes
59+ string description = 4 ;
5760}
5861
5962message IntegrationsServiceRegisterResponse {
60- RegisteredIntegrationItem result = 1 ;
63+ RegisteredIntegrationItem result = 1 ;
6164}
6265
63- message IntegrationsServiceAttachRequest {
64- // UUID of the workflow to attach
65- string workflow_id = 1 [(validate.rules ) .string.uuid = true ];
66- // UUID of the integration registration to attach
67- string integration_id = 2 [(validate.rules ) .string.uuid = true ];
68- // Arbitrary configuration for the integration
69- google.protobuf.Struct config = 4 [(validate.rules ) .message.required = true ];
66+ message IntegrationsServiceAttachRequest {
67+ // UUID of the workflow to attach
68+ string workflow_id = 1 [(validate.rules ) .string.uuid = true ];
69+ // UUID of the integration registration to attach
70+ string integration_id = 2 [(validate.rules ) .string.uuid = true ];
71+ // Arbitrary configuration for the integration
72+ google.protobuf.Struct config = 4 [(validate.rules ) .message.required = true ];
7073}
7174
72- message IntegrationsServiceAttachResponse {
73- IntegrationAttachmentItem result = 1 ;
75+ message IntegrationsServiceAttachResponse {
76+ IntegrationAttachmentItem result = 1 ;
7477}
7578
76- message IntegrationsServiceListAvailableRequest {}
77- message IntegrationsServiceListAvailableResponse {
78- repeated IntegrationAvailableItem result = 1 ;
79+ message IntegrationsServiceListAvailableRequest {}
80+ message IntegrationsServiceListAvailableResponse {
81+ repeated IntegrationAvailableItem result = 1 ;
7982}
8083
8184message IntegrationAvailableItem {
82- // Integration identifier
83- string id = 1 ;
84- string version = 2 ;
85- string description = 3 ;
85+ // Integration identifier
86+ string id = 1 ;
87+ string version = 2 ;
88+ string description = 3 ;
8689
87- oneof type {
88- PluginFanout fanout = 4 ;
89- }
90+ oneof type {
91+ PluginFanout fanout = 4 ;
92+ }
9093}
9194
9295// PluginFanout describes a plugin that can be used to fanout attestation and materials to multiple integrations
9396message PluginFanout {
94- // Registration JSON schema
95- bytes registration_schema = 4 ;
96- // Attachment JSON schema
97- bytes attachment_schema = 5 ;
98- // List of materials that the integration is subscribed to
99- repeated string subscribed_materials = 6 ;
97+ // Registration JSON schema
98+ bytes registration_schema = 4 ;
99+ // Attachment JSON schema
100+ bytes attachment_schema = 5 ;
101+ // List of materials that the integration is subscribed to
102+ repeated string subscribed_materials = 6 ;
100103}
101104
102- message IntegrationsServiceListRegistrationsRequest {}
103- message IntegrationsServiceListRegistrationsResponse {
104- repeated RegisteredIntegrationItem result = 1 ;
105+ message IntegrationsServiceListRegistrationsRequest {}
106+ message IntegrationsServiceListRegistrationsResponse {
107+ repeated RegisteredIntegrationItem result = 1 ;
105108}
106109
107- message IntegrationsServiceDescribeRegistrationRequest {
110+ message IntegrationsServiceDescribeRegistrationRequest {
108111 string id = 1 [(validate.rules ) .string.uuid = true ];
109112}
110113
111- message IntegrationsServiceDescribeRegistrationResponse {
112- RegisteredIntegrationItem result = 1 ;
114+ message IntegrationsServiceDescribeRegistrationResponse {
115+ RegisteredIntegrationItem result = 1 ;
113116}
114117
115- message IntegrationsServiceDetachRequest {
118+ message IntegrationsServiceDetachRequest {
116119 string id = 1 [(validate.rules ) .string.uuid = true ];
117120}
118121
119122message IntegrationsServiceDetachResponse {}
120123
121- message ListAttachmentsRequest {
124+ message ListAttachmentsRequest {
122125 // Filter by workflow
123126 string workflow_id = 1 ;
124127}
125128
126- message ListAttachmentsResponse {
127- repeated IntegrationAttachmentItem result = 1 ;
129+ message ListAttachmentsResponse {
130+ repeated IntegrationAttachmentItem result = 1 ;
128131}
129132
130133message RegisteredIntegrationItem {
131- string id = 1 ;
132- string kind = 2 ;
133- // Description of the registration, used for display purposes
134- string description = 4 ;
135- google.protobuf.Timestamp created_at = 3 ;
136- // Arbitrary configuration for the integration
137- bytes config = 5 ;
134+ string id = 1 ;
135+ // unique, DNS-like name for the registration
136+ string name = 6 ;
137+ string kind = 2 ;
138+ // Description of the registration, used for display purposes
139+ string description = 4 ;
140+ google.protobuf.Timestamp created_at = 3 ;
141+ // Arbitrary configuration for the integration
142+ bytes config = 5 ;
138143}
139144
140145message IntegrationAttachmentItem {
141- string id = 1 ;
142- google.protobuf.Timestamp created_at = 2 ;
143- // Arbitrary configuration for the attachment
144- bytes config = 3 ;
145- RegisteredIntegrationItem integration = 4 ;
146- WorkflowItem workflow = 5 ;
146+ string id = 1 ;
147+ google.protobuf.Timestamp created_at = 2 ;
148+ // Arbitrary configuration for the attachment
149+ bytes config = 3 ;
150+ RegisteredIntegrationItem integration = 4 ;
151+ WorkflowItem workflow = 5 ;
147152}
148153
149154message IntegrationsServiceDeregisterRequest {
150155 string id = 1 [(validate.rules ) .string.uuid = true ];
151156}
152157
153- message IntegrationsServiceDeregisterResponse {}
158+ message IntegrationsServiceDeregisterResponse {}
0 commit comments