rpc.proto 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. syntax = "proto3";
  2. package etcdserverpb;
  3. import "gogoproto/gogo.proto";
  4. import "etcd/mvcc/mvccpb/kv.proto";
  5. import "etcd/auth/authpb/auth.proto";
  6. option (gogoproto.marshaler_all) = true;
  7. option (gogoproto.unmarshaler_all) = true;
  8. service KV {
  9. // Range gets the keys in the range from the key-value store.
  10. rpc Range(RangeRequest) returns (RangeResponse) {}
  11. // Put puts the given key into the key-value store.
  12. // A put request increments the revision of the key-value store
  13. // and generates one event in the event history.
  14. rpc Put(PutRequest) returns (PutResponse) {}
  15. // DeleteRange deletes the given range from the key-value store.
  16. // A delete request increments the revision of the key-value store
  17. // and generates a delete event in the event history for every deleted key.
  18. rpc DeleteRange(DeleteRangeRequest) returns (DeleteRangeResponse) {}
  19. // Txn processes multiple requests in a single transaction.
  20. // A txn request increments the revision of the key-value store
  21. // and generates events with the same revision for every completed request.
  22. // It is not allowed to modify the same key several times within one txn.
  23. rpc Txn(TxnRequest) returns (TxnResponse) {}
  24. // Compact compacts the event history in the etcd key-value store. The key-value
  25. // store should be periodically compacted or the event history will continue to grow
  26. // indefinitely.
  27. rpc Compact(CompactionRequest) returns (CompactionResponse) {}
  28. }
  29. service Watch {
  30. // Watch watches for events happening or that have happened. Both input and output
  31. // are streams; the input stream is for creating and canceling watchers and the output
  32. // stream sends events. One watch RPC can watch on multiple key ranges, streaming events
  33. // for several watches at once. The entire event history can be watched starting from the
  34. // last compaction revision.
  35. rpc Watch(stream WatchRequest) returns (stream WatchResponse) {}
  36. }
  37. service Lease {
  38. // LeaseGrant creates a lease which expires if the server does not receive a keepAlive
  39. // within a given time to live period. All keys attached to the lease will be expired and
  40. // deleted if the lease expires. Each expired key generates a delete event in the event history.
  41. rpc LeaseGrant(LeaseGrantRequest) returns (LeaseGrantResponse) {}
  42. // LeaseRevoke revokes a lease. All keys attached to the lease will expire and be deleted.
  43. rpc LeaseRevoke(LeaseRevokeRequest) returns (LeaseRevokeResponse) {}
  44. // LeaseKeepAlive keeps the lease alive by streaming keep alive requests from the client
  45. // to the server and streaming keep alive responses from the server to the client.
  46. rpc LeaseKeepAlive(stream LeaseKeepAliveRequest) returns (stream LeaseKeepAliveResponse) {}
  47. // TODO(xiangli) List all existing Leases?
  48. // TODO(xiangli) Get details information (expirations, leased keys, etc.) of a lease?
  49. }
  50. service Cluster {
  51. // MemberAdd adds a member into the cluster.
  52. rpc MemberAdd(MemberAddRequest) returns (MemberAddResponse) {}
  53. // MemberRemove removes an existing member from the cluster.
  54. rpc MemberRemove(MemberRemoveRequest) returns (MemberRemoveResponse) {}
  55. // MemberUpdate updates the member configuration.
  56. rpc MemberUpdate(MemberUpdateRequest) returns (MemberUpdateResponse) {}
  57. // MemberList lists all the members in the cluster.
  58. rpc MemberList(MemberListRequest) returns (MemberListResponse) {}
  59. }
  60. service Maintenance {
  61. // Alarm activates, deactivates, and queries alarms regarding cluster health.
  62. rpc Alarm(AlarmRequest) returns (AlarmResponse) {}
  63. // Status gets the status of the member.
  64. rpc Status(StatusRequest) returns (StatusResponse) {}
  65. // Defragment defragments a member's backend database to recover storage space.
  66. rpc Defragment(DefragmentRequest) returns (DefragmentResponse) {}
  67. // Hash returns the hash of the local KV state for consistency checking purpose.
  68. // This is designed for testing; do not use this in production when there
  69. // are ongoing transactions.
  70. rpc Hash(HashRequest) returns (HashResponse) {}
  71. // Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
  72. rpc Snapshot(SnapshotRequest) returns (stream SnapshotResponse) {}
  73. }
  74. service Auth {
  75. // AuthEnable enables authentication.
  76. rpc AuthEnable(AuthEnableRequest) returns (AuthEnableResponse) {}
  77. // AuthDisable disables authentication.
  78. rpc AuthDisable(AuthDisableRequest) returns (AuthDisableResponse) {}
  79. // Authenticate processes an authenticate request.
  80. rpc Authenticate(AuthenticateRequest) returns (AuthenticateResponse) {}
  81. // UserAdd adds a new user.
  82. rpc UserAdd(AuthUserAddRequest) returns (AuthUserAddResponse) {}
  83. // UserGet gets detailed user information or lists all users.
  84. rpc UserGet(AuthUserGetRequest) returns (AuthUserGetResponse) {}
  85. // UserDelete deletes a specified user.
  86. rpc UserDelete(AuthUserDeleteRequest) returns (AuthUserDeleteResponse) {}
  87. // UserChangePassword changes the password of a specified user.
  88. rpc UserChangePassword(AuthUserChangePasswordRequest) returns (AuthUserChangePasswordResponse) {}
  89. // UserGrant grants a role to a specified user.
  90. rpc UserGrantRole(AuthUserGrantRoleRequest) returns (AuthUserGrantRoleResponse) {}
  91. // UserRevokeRole revokes a role of specified user.
  92. rpc UserRevokeRole(AuthUserRevokeRoleRequest) returns (AuthUserRevokeRoleResponse) {}
  93. // RoleAdd adds a new role.
  94. rpc RoleAdd(AuthRoleAddRequest) returns (AuthRoleAddResponse) {}
  95. // RoleGet gets detailed role information or lists all roles.
  96. rpc RoleGet(AuthRoleGetRequest) returns (AuthRoleGetResponse) {}
  97. // RoleDelete deletes a specified role.
  98. rpc RoleDelete(AuthRoleDeleteRequest) returns (AuthRoleDeleteResponse) {}
  99. // RoleGrantPermission grants a permission of a specified key or range to a specified role.
  100. rpc RoleGrantPermission(AuthRoleGrantPermissionRequest) returns (AuthRoleGrantPermissionResponse) {}
  101. // RoleRevokePermission revokes a key or range permission of a specified role.
  102. rpc RoleRevokePermission(AuthRoleRevokePermissionRequest) returns (AuthRoleRevokePermissionResponse) {}
  103. }
  104. message ResponseHeader {
  105. // cluster_id is the ID of the cluster which sent the response.
  106. uint64 cluster_id = 1;
  107. // member_id is the ID of the member which sent the response.
  108. uint64 member_id = 2;
  109. // revision is the key-value store revision when the request was applied.
  110. int64 revision = 3;
  111. // raft_term is the raft term when the request was applied.
  112. uint64 raft_term = 4;
  113. }
  114. message RangeRequest {
  115. enum SortOrder {
  116. NONE = 0; // default, no sorting
  117. ASCEND = 1; // lowest target value first
  118. DESCEND = 2; // highest target value first
  119. }
  120. enum SortTarget {
  121. KEY = 0;
  122. VERSION = 1;
  123. CREATE = 2;
  124. MOD = 3;
  125. VALUE = 4;
  126. }
  127. // key is the first key for the range. If range_end is not given, the request only looks up key.
  128. bytes key = 1;
  129. // range_end is the upper bound on the requested range [key, range_end).
  130. // If range_end is '\0', the range is all keys >= key.
  131. // If the range_end is one bit larger than the given key,
  132. // then the range requests get the all keys with the prefix (the given key).
  133. // If both key and range_end are '\0', then range requests returns all keys.
  134. bytes range_end = 2;
  135. // limit is a limit on the number of keys returned for the request.
  136. int64 limit = 3;
  137. // revision is the point-in-time of the key-value store to use for the range.
  138. // If revision is less or equal to zero, the range is over the newest key-value store.
  139. // If the revision has been compacted, ErrCompaction is returned as a response.
  140. int64 revision = 4;
  141. // sort_order is the order for returned sorted results.
  142. SortOrder sort_order = 5;
  143. // sort_target is the key-value field to use for sorting.
  144. SortTarget sort_target = 6;
  145. // serializable sets the range request to use serializable member-local reads.
  146. // Range requests are linearizable by default; linearizable requests have higher
  147. // latency and lower throughput than serializable requests but reflect the current
  148. // consensus of the cluster. For better performance, in exchange for possible stale reads,
  149. // a serializable range request is served locally without needing to reach consensus
  150. // with other nodes in the cluster.
  151. bool serializable = 7;
  152. }
  153. message RangeResponse {
  154. ResponseHeader header = 1;
  155. // kvs is the list of key-value pairs matched by the range request.
  156. repeated mvccpb.KeyValue kvs = 2;
  157. // more indicates if there are more keys to return in the requested range.
  158. bool more = 3;
  159. }
  160. message PutRequest {
  161. // key is the key, in bytes, to put into the key-value store.
  162. bytes key = 1;
  163. // value is the value, in bytes, to associate with the key in the key-value store.
  164. bytes value = 2;
  165. // lease is the lease ID to associate with the key in the key-value store. A lease
  166. // value of 0 indicates no lease.
  167. int64 lease = 3;
  168. }
  169. message PutResponse {
  170. ResponseHeader header = 1;
  171. }
  172. message DeleteRangeRequest {
  173. // key is the first key to delete in the range.
  174. bytes key = 1;
  175. // range_end is the key following the last key to delete for the range [key, range_end).
  176. // If range_end is not given, the range is defined to contain only the key argument.
  177. // If range_end is '\0', the range is all keys greater than or equal to the key argument.
  178. bytes range_end = 2;
  179. }
  180. message DeleteRangeResponse {
  181. ResponseHeader header = 1;
  182. // deleted is the number of keys deleted by the delete range request.
  183. int64 deleted = 2;
  184. }
  185. message RequestOp {
  186. // request is a union of request types accepted by a transaction.
  187. oneof request {
  188. RangeRequest request_range = 1;
  189. PutRequest request_put = 2;
  190. DeleteRangeRequest request_delete_range = 3;
  191. }
  192. }
  193. message ResponseOp {
  194. // response is a union of response types returned by a transaction.
  195. oneof response {
  196. RangeResponse response_range = 1;
  197. PutResponse response_put = 2;
  198. DeleteRangeResponse response_delete_range = 3;
  199. }
  200. }
  201. message Compare {
  202. enum CompareResult {
  203. EQUAL = 0;
  204. GREATER = 1;
  205. LESS = 2;
  206. }
  207. enum CompareTarget {
  208. VERSION = 0;
  209. CREATE = 1;
  210. MOD = 2;
  211. VALUE= 3;
  212. }
  213. // result is logical comparison operation for this comparison.
  214. CompareResult result = 1;
  215. // target is the key-value field to inspect for the comparison.
  216. CompareTarget target = 2;
  217. // key is the subject key for the comparison operation.
  218. bytes key = 3;
  219. oneof target_union {
  220. // version is the version of the given key
  221. int64 version = 4;
  222. // create_revision is the creation revision of the given key
  223. int64 create_revision = 5;
  224. // mod_revision is the last modified revision of the given key.
  225. int64 mod_revision = 6;
  226. // value is the value of the given key, in bytes.
  227. bytes value = 7;
  228. }
  229. }
  230. // From google paxosdb paper:
  231. // Our implementation hinges around a powerful primitive which we call MultiOp. All other database
  232. // operations except for iteration are implemented as a single call to MultiOp. A MultiOp is applied atomically
  233. // and consists of three components:
  234. // 1. A list of tests called guard. Each test in guard checks a single entry in the database. It may check
  235. // for the absence or presence of a value, or compare with a given value. Two different tests in the guard
  236. // may apply to the same or different entries in the database. All tests in the guard are applied and
  237. // MultiOp returns the results. If all tests are true, MultiOp executes t op (see item 2 below), otherwise
  238. // it executes f op (see item 3 below).
  239. // 2. A list of database operations called t op. Each operation in the list is either an insert, delete, or
  240. // lookup operation, and applies to a single database entry. Two different operations in the list may apply
  241. // to the same or different entries in the database. These operations are executed
  242. // if guard evaluates to
  243. // true.
  244. // 3. A list of database operations called f op. Like t op, but executed if guard evaluates to false.
  245. message TxnRequest {
  246. // compare is a list of predicates representing a conjunction of terms.
  247. // If the comparisons succeed, then the success requests will be processed in order,
  248. // and the response will contain their respective responses in order.
  249. // If the comparisons fail, then the failure requests will be processed in order,
  250. // and the response will contain their respective responses in order.
  251. repeated Compare compare = 1;
  252. // success is a list of requests which will be applied when compare evaluates to true.
  253. repeated RequestOp success = 2;
  254. // failure is a list of requests which will be applied when compare evaluates to false.
  255. repeated RequestOp failure = 3;
  256. }
  257. message TxnResponse {
  258. ResponseHeader header = 1;
  259. // succeeded is set to true if the compare evaluated to true or false otherwise.
  260. bool succeeded = 2;
  261. // responses is a list of responses corresponding to the results from applying
  262. // success if succeeded is true or failure if succeeded is false.
  263. repeated ResponseOp responses = 3;
  264. }
  265. // CompactionRequest compacts the key-value store up to a given revision. All superseded keys
  266. // with a revision less than the compaction revision will be removed.
  267. message CompactionRequest {
  268. // revision is the key-value store revision for the compaction operation.
  269. int64 revision = 1;
  270. // physical is set so the RPC will wait until the compaction is physically
  271. // applied to the local database such that compacted entries are totally
  272. // removed from the backend database.
  273. bool physical = 2;
  274. }
  275. message CompactionResponse {
  276. ResponseHeader header = 1;
  277. }
  278. message HashRequest {
  279. }
  280. message HashResponse {
  281. ResponseHeader header = 1;
  282. // hash is the hash value computed from the responding member's key-value store.
  283. uint32 hash = 2;
  284. }
  285. message SnapshotRequest {
  286. }
  287. message SnapshotResponse {
  288. // header has the current key-value store information. The first header in the snapshot
  289. // stream indicates the point in time of the snapshot.
  290. ResponseHeader header = 1;
  291. // remaining_bytes is the number of blob bytes to be sent after this message
  292. uint64 remaining_bytes = 2;
  293. // blob contains the next chunk of the snapshot in the snapshot stream.
  294. bytes blob = 3;
  295. }
  296. message WatchRequest {
  297. // request_union is a request to either create a new watcher or cancel an existing watcher.
  298. oneof request_union {
  299. WatchCreateRequest create_request = 1;
  300. WatchCancelRequest cancel_request = 2;
  301. }
  302. }
  303. message WatchCreateRequest {
  304. // key is the key to register for watching.
  305. bytes key = 1;
  306. // range_end is the end of the range [key, range_end) to watch. If range_end is not given,
  307. // only the key argument is watched. If range_end is equal to '\0', all keys greater than
  308. // or equal to the key argument are watched.
  309. bytes range_end = 2;
  310. // start_revision is an optional revision to watch from (inclusive). No start_revision is "now".
  311. int64 start_revision = 3;
  312. // progress_notify is set so that the etcd server will periodically send a WatchResponse with
  313. // no events to the new watcher if there are no recent events. It is useful when clients
  314. // wish to recover a disconnected watcher starting from a recent known revision.
  315. // The etcd server may decide how often it will send notifications based on current load.
  316. bool progress_notify = 4;
  317. }
  318. message WatchCancelRequest {
  319. // watch_id is the watcher id to cancel so that no more events are transmitted.
  320. int64 watch_id = 1;
  321. }
  322. message WatchResponse {
  323. ResponseHeader header = 1;
  324. // watch_id is the ID of the watcher that corresponds to the response.
  325. int64 watch_id = 2;
  326. // created is set to true if the response is for a create watch request.
  327. // The client should record the watch_id and expect to receive events for
  328. // the created watcher from the same stream.
  329. // All events sent to the created watcher will attach with the same watch_id.
  330. bool created = 3;
  331. // canceled is set to true if the response is for a cancel watch request.
  332. // No further events will be sent to the canceled watcher.
  333. bool canceled = 4;
  334. // compact_revision is set to the minimum index if a watcher tries to watch
  335. // at a compacted index.
  336. //
  337. // This happens when creating a watcher at a compacted revision or the watcher cannot
  338. // catch up with the progress of the key-value store.
  339. //
  340. // The client should treat the watcher as canceled and should not try to create any
  341. // watcher with the same start_revision again.
  342. int64 compact_revision = 5;
  343. repeated mvccpb.Event events = 11;
  344. }
  345. message LeaseGrantRequest {
  346. // TTL is the advisory time-to-live in seconds.
  347. int64 TTL = 1;
  348. // ID is the requested ID for the lease. If ID is set to 0, the lessor chooses an ID.
  349. int64 ID = 2;
  350. }
  351. message LeaseGrantResponse {
  352. ResponseHeader header = 1;
  353. // ID is the lease ID for the granted lease.
  354. int64 ID = 2;
  355. // TTL is the server chosen lease time-to-live in seconds.
  356. int64 TTL = 3;
  357. string error = 4;
  358. }
  359. message LeaseRevokeRequest {
  360. // ID is the lease ID to revoke. When the ID is revoked, all associated keys will be deleted.
  361. int64 ID = 1;
  362. }
  363. message LeaseRevokeResponse {
  364. ResponseHeader header = 1;
  365. }
  366. message LeaseKeepAliveRequest {
  367. // ID is the lease ID for the lease to keep alive.
  368. int64 ID = 1;
  369. }
  370. message LeaseKeepAliveResponse {
  371. ResponseHeader header = 1;
  372. // ID is the lease ID from the keep alive request.
  373. int64 ID = 2;
  374. // TTL is the new time-to-live for the lease.
  375. int64 TTL = 3;
  376. }
  377. message Member {
  378. // ID is the member ID for this member.
  379. uint64 ID = 1;
  380. // name is the human-readable name of the member. If the member is not started, the name will be an empty string.
  381. string name = 2;
  382. // peerURLs is the list of URLs the member exposes to the cluster for communication.
  383. repeated string peerURLs = 3;
  384. // clientURLs is the list of URLs the member exposes to clients for communication. If the member is not started, clientURLs will be empty.
  385. repeated string clientURLs = 4;
  386. }
  387. message MemberAddRequest {
  388. // peerURLs is the list of URLs the added member will use to communicate with the cluster.
  389. repeated string peerURLs = 1;
  390. }
  391. message MemberAddResponse {
  392. ResponseHeader header = 1;
  393. // member is the member information for the added member.
  394. Member member = 2;
  395. }
  396. message MemberRemoveRequest {
  397. // ID is the member ID of the member to remove.
  398. uint64 ID = 1;
  399. }
  400. message MemberRemoveResponse {
  401. ResponseHeader header = 1;
  402. }
  403. message MemberUpdateRequest {
  404. // ID is the member ID of the member to update.
  405. uint64 ID = 1;
  406. // peerURLs is the new list of URLs the member will use to communicate with the cluster.
  407. repeated string peerURLs = 2;
  408. }
  409. message MemberUpdateResponse{
  410. ResponseHeader header = 1;
  411. }
  412. message MemberListRequest {
  413. }
  414. message MemberListResponse {
  415. ResponseHeader header = 1;
  416. // members is a list of all members associated with the cluster.
  417. repeated Member members = 2;
  418. }
  419. message DefragmentRequest {
  420. }
  421. message DefragmentResponse {
  422. ResponseHeader header = 1;
  423. }
  424. enum AlarmType {
  425. NONE = 0; // default, used to query if any alarm is active
  426. NOSPACE = 1; // space quota is exhausted
  427. }
  428. message AlarmRequest {
  429. enum AlarmAction {
  430. GET = 0;
  431. ACTIVATE = 1;
  432. DEACTIVATE = 2;
  433. }
  434. // action is the kind of alarm request to issue. The action
  435. // may GET alarm statuses, ACTIVATE an alarm, or DEACTIVATE a
  436. // raised alarm.
  437. AlarmAction action = 1;
  438. // memberID is the ID of the member associated with the alarm. If memberID is 0, the
  439. // alarm request covers all members.
  440. uint64 memberID = 2;
  441. // alarm is the type of alarm to consider for this request.
  442. AlarmType alarm = 3;
  443. }
  444. message AlarmMember {
  445. // memberID is the ID of the member associated with the raised alarm.
  446. uint64 memberID = 1;
  447. // alarm is the type of alarm which has been raised.
  448. AlarmType alarm = 2;
  449. }
  450. message AlarmResponse {
  451. ResponseHeader header = 1;
  452. // alarms is a list of alarms associated with the alarm request.
  453. repeated AlarmMember alarms = 2;
  454. }
  455. message StatusRequest {
  456. }
  457. message StatusResponse {
  458. ResponseHeader header = 1;
  459. // version is the cluster protocol version used by the responding member.
  460. string version = 2;
  461. // dbSize is the size of the backend database, in bytes, of the responding member.
  462. int64 dbSize = 3;
  463. // leader is the member ID which the responding member believes is the current leader.
  464. uint64 leader = 4;
  465. // raftIndex is the current raft index of the responding member.
  466. uint64 raftIndex = 5;
  467. // raftTerm is the current raft term of the responding member.
  468. uint64 raftTerm = 6;
  469. }
  470. message AuthEnableRequest {
  471. }
  472. message AuthDisableRequest {
  473. }
  474. message AuthenticateRequest {
  475. string name = 1;
  476. string password = 2;
  477. }
  478. message AuthUserAddRequest {
  479. string name = 1;
  480. string password = 2;
  481. }
  482. message AuthUserGetRequest {
  483. string name = 1;
  484. }
  485. message AuthUserDeleteRequest {
  486. // name is the name of the user to delete.
  487. string name = 1;
  488. }
  489. message AuthUserChangePasswordRequest {
  490. // name is the name of the user whose password is being changed.
  491. string name = 1;
  492. // password is the new password for the user.
  493. string password = 2;
  494. }
  495. message AuthUserGrantRoleRequest {
  496. // user is the name of the user which should be granted a given role.
  497. string user = 1;
  498. // role is the name of the role to grant to the user.
  499. string role = 2;
  500. }
  501. message AuthUserRevokeRoleRequest {
  502. string name = 1;
  503. string role = 2;
  504. }
  505. message AuthRoleAddRequest {
  506. // name is the name of the role to add to the authentication system.
  507. string name = 1;
  508. }
  509. message AuthRoleGetRequest {
  510. string role = 1;
  511. }
  512. message AuthRoleDeleteRequest {
  513. string role = 1;
  514. }
  515. message AuthRoleGrantPermissionRequest {
  516. // name is the name of the role which will be granted the permission.
  517. string name = 1;
  518. // perm is the permission to grant to the role.
  519. authpb.Permission perm = 2;
  520. }
  521. message AuthRoleRevokePermissionRequest {
  522. string role = 1;
  523. string key = 2;
  524. string range_end = 3;
  525. }
  526. message AuthEnableResponse {
  527. ResponseHeader header = 1;
  528. }
  529. message AuthDisableResponse {
  530. ResponseHeader header = 1;
  531. }
  532. message AuthenticateResponse {
  533. ResponseHeader header = 1;
  534. // token is an authorized token that can be used in succeeding RPCs
  535. string token = 2;
  536. }
  537. message AuthUserAddResponse {
  538. ResponseHeader header = 1;
  539. }
  540. message AuthUserGetResponse {
  541. ResponseHeader header = 1;
  542. repeated string roles = 2;
  543. }
  544. message AuthUserDeleteResponse {
  545. ResponseHeader header = 1;
  546. }
  547. message AuthUserChangePasswordResponse {
  548. ResponseHeader header = 1;
  549. }
  550. message AuthUserGrantRoleResponse {
  551. ResponseHeader header = 1;
  552. }
  553. message AuthUserRevokeRoleResponse {
  554. ResponseHeader header = 1;
  555. }
  556. message AuthRoleAddResponse {
  557. ResponseHeader header = 1;
  558. }
  559. message AuthRoleGetResponse {
  560. ResponseHeader header = 1;
  561. repeated authpb.Permission perm = 2;
  562. }
  563. message AuthRoleDeleteResponse {
  564. ResponseHeader header = 1;
  565. }
  566. message AuthRoleGrantPermissionResponse {
  567. ResponseHeader header = 1;
  568. }
  569. message AuthRoleRevokePermissionResponse {
  570. ResponseHeader header = 1;
  571. }