mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
This commit implements RoleGet() RPC of etcdserver and adds a new
subcommand "role get" to etcdctl v3. It will list up permissions that
are granted to a given role.
$ ETCDCTL_API=3 bin/etcdctl role get r1
Role r1
KV Read:
b
d
KV Write:
a
c
d
53 lines
1.4 KiB
Protocol Buffer
53 lines
1.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
package etcdserverpb;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "etcdserver.proto";
|
|
import "rpc.proto";
|
|
|
|
option (gogoproto.marshaler_all) = true;
|
|
option (gogoproto.sizer_all) = true;
|
|
option (gogoproto.unmarshaler_all) = true;
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
message RequestHeader {
|
|
uint64 ID = 1;
|
|
// username is a username that is associated with an auth token of gRPC connection
|
|
string username = 2;
|
|
}
|
|
|
|
// An InternalRaftRequest is the union of all requests which can be
|
|
// sent via raft.
|
|
message InternalRaftRequest {
|
|
RequestHeader header = 100;
|
|
uint64 ID = 1;
|
|
|
|
Request v2 = 2;
|
|
|
|
RangeRequest range = 3;
|
|
PutRequest put = 4;
|
|
DeleteRangeRequest delete_range = 5;
|
|
TxnRequest txn = 6;
|
|
CompactionRequest compaction = 7;
|
|
|
|
LeaseGrantRequest lease_grant = 8;
|
|
LeaseRevokeRequest lease_revoke = 9;
|
|
|
|
AlarmRequest alarm = 10;
|
|
|
|
AuthEnableRequest auth_enable = 1000;
|
|
AuthDisableRequest auth_disable = 1011;
|
|
AuthUserAddRequest auth_user_add = 1012;
|
|
AuthUserDeleteRequest auth_user_delete = 1013;
|
|
AuthUserChangePasswordRequest auth_user_change_password = 1014;
|
|
AuthUserGrantRequest auth_user_grant = 1015;
|
|
AuthRoleAddRequest auth_role_add = 1016;
|
|
AuthRoleGrantRequest auth_role_grant = 1017;
|
|
AuthenticateRequest authenticate = 1018;
|
|
AuthUserGetRequest auth_user_get = 1019;
|
|
AuthRoleGetRequest auth_role_get = 1020;
|
|
}
|
|
|
|
message EmptyResponse {
|
|
}
|