mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

This commit adds a new subcommand "user get" to etcdctl v3. It will list up roles that are granted to a given user. Example: $ ETCDCTL_API=3 bin/etcdctl user get u1 User: u1 Roles: r1 r2 r3 This commit also modifies the layout of InternalRaftRequest for frequent update of auth related members.
52 lines
1.3 KiB
Protocol Buffer
52 lines
1.3 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;
|
|
}
|
|
|
|
message EmptyResponse {
|
|
}
|