*: support revoking a key from a role in auth v3

This commit implements RoleRevoke() RPC for supporting revoking a key
from a role in auth v3. It also adds a new subcommand "role revoke" to
etcdctl.
This commit is contained in:
Hitoshi Mitake
2016-06-03 17:10:08 +09:00
committed by Hitoshi Mitake
parent 957b07c408
commit 0cb1343109
10 changed files with 435 additions and 207 deletions

View File

@@ -74,8 +74,11 @@ func (as *AuthServer) RoleGet(ctx context.Context, r *pb.AuthRoleGetRequest) (*p
}
func (as *AuthServer) RoleRevoke(ctx context.Context, r *pb.AuthRoleRevokeRequest) (*pb.AuthRoleRevokeResponse, error) {
plog.Info("not implemented yet")
return nil, nil
resp, err := as.authenticator.RoleRevoke(ctx, r)
if err != nil {
return nil, togRPCError(err)
}
return resp, nil
}
func (as *AuthServer) RoleGrant(ctx context.Context, r *pb.AuthRoleGrantRequest) (*pb.AuthRoleGrantResponse, error) {