Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.

Commit dc26073

Browse files
committed
Updating the spec document
1 parent c67d6ca commit dc26073

File tree

1 file changed

+39
-37
lines changed

1 file changed

+39
-37
lines changed

Diff for: spec.md

+39-37
Original file line numberDiff line numberDiff line change
@@ -182,24 +182,24 @@ extend google.protobuf.ServiceOptions {
182182
service Identity {
183183
// This call is meant to retrieve the unique provisioner Identity.
184184
// This identity will have to be set in BucketRequest.Provisioner field in order to invoke this specific provisioner.
185-
rpc ProvisionerGetInfo (ProvisionerGetInfoRequest) returns (ProvisionerGetInfoResponse) {}
185+
rpc DriverGetInfo (DriverGetInfoRequest) returns (DriverGetInfoResponse) {}
186186
}
187187
188188
service Provisioner {
189189
// This call is made to create the bucket in the backend.
190190
// This call is idempotent
191191
// 1. If a bucket that matches both name and parameters already exists, then OK (success) must be returned.
192192
// 2. If a bucket by same name, but different parameters is provided, then the appropriate error code ALREADY_EXISTS must be returned.
193-
rpc ProvisionerCreateBucket (ProvisionerCreateBucketRequest) returns (ProvisionerCreateBucketResponse) {}
193+
rpc DriverCreateBucket (DriverCreateBucketRequest) returns (DriverCreateBucketResponse) {}
194194
// This call is made to delete the bucket in the backend.
195195
// If the bucket has already been deleted, then no error should be returned.
196-
rpc ProvisionerDeleteBucket (ProvisionerDeleteBucketRequest) returns (ProvisionerDeleteBucketResponse) {}
196+
rpc DriverDeleteBucket (DriverDeleteBucketRequest) returns (DriverDeleteBucketResponse) {}
197197
198198
// This call grants access to an account. The account_name in the request shall be used as a unique identifier to create credentials.
199-
// The account_id returned in the response will be used as the unique identifier for deleting this access when calling ProvisionerRevokeBucketAccess.
200-
rpc ProvisionerGrantBucketAccess (ProvisionerGrantBucketAccessRequest) returns (ProvisionerGrantBucketAccessResponse);
199+
// The account_id returned in the response will be used as the unique identifier for deleting this access when calling DriverRevokeBucketAccess.
200+
rpc DriverGrantBucketAccess (DriverGrantBucketAccessRequest) returns (DriverGrantBucketAccessResponse);
201201
// This call revokes all access to a particular bucket from a principal.
202-
rpc ProvisionerRevokeBucketAccess (ProvisionerRevokeBucketAccessRequest) returns (ProvisionerRevokeBucketAccessResponse);
202+
rpc DriverRevokeBucketAccess (DriverRevokeBucketAccessRequest) returns (DriverRevokeBucketAccessResponse);
203203
}
204204
205205
// S3SignatureVersion is the version of the signing algorithm for all s3 requests
@@ -223,6 +223,14 @@ enum AnonymousBucketAccessMode {
223223
ReadWrite = 4;
224224
}
225225
226+
enum AuthenticationType {
227+
UnknownAuthenticationType = 0;
228+
// Default, KEY based authentication.
229+
Key = 1;
230+
// Storageaccount based authentication.
231+
IAM = 2;
232+
}
233+
226234
message S3 {
227235
// region denotes the geographical region where the S3 server is running
228236
string region = 1;
@@ -252,11 +260,11 @@ message Protocol {
252260
}
253261
}
254262
255-
message ProvisionerGetInfoRequest {
263+
message DriverGetInfoRequest {
256264
// Intentionally left blank
257265
}
258266
259-
message ProvisionerGetInfoResponse {
267+
message DriverGetInfoResponse {
260268
// This field is REQUIRED
261269
// The name MUST follow domain name notation format
262270
// (https://tools.ietf.org/html/rfc1035#section-2.3.1). It SHOULD
@@ -268,72 +276,71 @@ message ProvisionerGetInfoResponse {
268276
string name = 1;
269277
}
270278
271-
message ProvisionerCreateBucketRequest {
279+
message DriverCreateBucketRequest {
272280
// This field is REQUIRED
273281
// name specifies the name of the bucket that should be created.
274282
string name = 1;
275283
276-
// This field is REQUIRED
277-
// Protocol specific information required by the call is passed in as key,value pairs.
278-
Protocol protocol = 2;
279-
280284
// This field is OPTIONAL
281285
// The caller should treat the values in parameters as opaque.
282286
// The receiver is responsible for parsing and validating the values.
283-
map<string,string> parameters = 3;
287+
map<string,string> parameters = 2;
284288
}
285289
286-
message ProvisionerCreateBucketResponse {
290+
message DriverCreateBucketResponse {
287291
// bucket_id returned here is expected to be the globally unique
288-
// identifier for the bucket in the object storage provider
292+
// identifier for the bucket in the object storage provider.
289293
string bucket_id = 1;
294+
295+
// bucket_info returned here stores the data specific to the
296+
// bucket required by the object storage provider to connect to the bucket.
297+
Protocol bucket_info = 2;
290298
}
291299
292-
message ProvisionerDeleteBucketRequest {
300+
message DriverDeleteBucketRequest {
293301
// This field is REQUIRED
294302
// bucket_id is a globally unique identifier for the bucket
295303
// in the object storage provider
296304
string bucket_id = 1;
297305
}
298306
299-
message ProvisionerDeleteBucketResponse {
307+
message DriverDeleteBucketResponse {
300308
// Intentionally left blank
301309
}
302310
303-
message ProvisionerGrantBucketAccessRequest {
311+
message DriverGrantBucketAccessRequest {
304312
// This field is REQUIRED
305313
// bucket_id is a globally unique identifier for the bucket
306314
// in the object storage provider
307315
string bucket_id = 1;
308316
309317
// This field is REQUIRED
310-
// account_name is a identifier for object storage provider
311-
// to ensure that multiple requests for the same account
312-
// result in only one access token being created
313-
string account_name = 2;
318+
// name field is used to define the name of the bucket access object.
319+
string name = 2;
314320
315321
// This field is REQUIRED
316-
// Requested Access policy, ex: {"Effect":"Allow","Action":"s3:PutObject","Resource":"arn:aws:s3:::profilepics/*"}
317-
string access_policy = 3;
322+
// Requested authentication type for the bucket access.
323+
// Supported authentication types are KEY or IAM.
324+
AuthenticationType authentication_type = 3;
318325
319326
// This field is OPTIONAL
320327
// The caller should treat the values in parameters as opaque.
321328
// The receiver is responsible for parsing and validating the values.
322329
map<string,string> parameters = 4;
323330
}
324331
325-
message ProvisionerGrantBucketAccessResponse {
326-
// This field is OPTIONAL
332+
message DriverGrantBucketAccessResponse {
333+
// This field is REQUIRED
327334
// This is the account_id that is being provided access. This will
328335
// be required later to revoke access.
329336
string account_id = 1;
330337
331-
// This field is OPTIONAL
338+
// This field is REQUIRED
332339
// Credentials supplied for accessing the bucket ex: aws access key id and secret, etc.
333340
string credentials = 2;
334341
}
335342
336-
message ProvisionerRevokeBucketAccessRequest {
343+
message DriverRevokeBucketAccessRequest {
337344
// This field is REQUIRED
338345
// bucket_id is a globally unique identifier for the bucket
339346
// in the object storage provider.
@@ -344,7 +351,7 @@ message ProvisionerRevokeBucketAccessRequest {
344351
string account_id = 2;
345352
}
346353
347-
message ProvisionerRevokeBucketAccessResponse {
354+
message DriverRevokeBucketAccessResponse {
348355
// Intentionally left blank
349356
}
350357
@@ -423,19 +430,14 @@ The general flow of the success case MAY be as follows (protos illustrated in YA
423430
request:
424431
response:
425432
name: org.foo.whizbang.super-plugin
426-
version: blue-green
427-
manifest:
428-
baz: qaz
429433
```
430434
```
431-
message ProvisionerGetInfoRequest {
435+
message DriverGetInfoRequest {
432436
// Intentionally left blank
433437
}
434438
435-
message ProvisionerGetInfoResponse {
439+
message DriverGetInfoResponse {
436440
string name = 1;
437-
string version = 2;
438-
map<string,string> manifest = 3;
439441
}
440442
```
441443

0 commit comments

Comments
 (0)