Skip to content

Commit 8874097

Browse files
authored
Authenticate operations in KeyspaceService (#7)
## What is the goal of this PR? Operations with keyspaces need to be authenticated with `username`/`password` in enterprise version. In order to support that, protocol needs to be changed. Additionally, RPC method to create keyspace is now obsolete and needs to be removed. ## What are the changes implemented in this PR? * Remove `create` RPC method as well as `Create.Req`/`Create.Res` * Accept `username` and `password` in `Retrieve.Req` and `Delete.Req`
1 parent dbbea5a commit 8874097

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

keyspace/Keyspace.proto

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,28 @@ option java_outer_classname = "KeyspaceProto";
2424
package keyspace;
2525

2626
service KeyspaceService {
27-
rpc create (Keyspace.Create.Req) returns (Keyspace.Create.Res);
2827
rpc retrieve (Keyspace.Retrieve.Req) returns (Keyspace.Retrieve.Res);
2928
rpc delete (Keyspace.Delete.Req) returns (Keyspace.Delete.Res);
3029
}
3130

3231
message Keyspace {
3332
message Retrieve {
34-
message Req {}
33+
message Req {
34+
/* Fields ignored in the open-source version. */
35+
string username = 1;
36+
string password = 2;
37+
}
3538
message Res {
3639
repeated string names = 1;
3740
}
3841
}
3942

40-
message Create {
41-
message Req {
42-
string name = 1;
43-
}
44-
message Res {}
45-
}
46-
4743
message Delete {
4844
message Req {
4945
string name = 1;
46+
/* Fields ignored in the open-source version. */
47+
string username = 2;
48+
string password = 3;
5049
}
5150
message Res {}
5251
}

0 commit comments

Comments
 (0)