2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 option java_package = "org.apache.hadoop.hbase.shaded.protobuf.generated";
22 option java_outer_classname = "AccessControlProtos";
23 option java_generic_services = true;
24 option java_generate_equals_and_hash = true;
25 option optimize_for = SPEED;
30 * Messages and services in shaded AccessControl.proto only use for serializing/deserializing permissions
31 * in .snapshotinfo, and should not use for access control logic for coprocessor endpoints compatibility
32 * (use AccessControl.proto under hbase-protocol module instead).
48 required Type type = 1;
49 optional GlobalPermission global_permission = 2;
50 optional NamespacePermission namespace_permission = 3;
51 optional TablePermission table_permission = 4;
54 message TablePermission {
55 optional TableName table_name = 1;
56 optional bytes family = 2;
57 optional bytes qualifier = 3;
58 repeated Permission.Action action = 4;
61 message NamespacePermission {
62 optional bytes namespace_name = 1;
63 repeated Permission.Action action = 2;
66 message GlobalPermission {
67 repeated Permission.Action action = 1;
70 message UserPermission {
71 required bytes user = 1;
72 required Permission permission = 3;
76 * Content of the /hbase/acl/<table or namespace> znode.
78 message UsersAndPermissions {
79 message UserPermissions {
80 required bytes user = 1;
81 repeated Permission permissions = 2;
84 repeated UserPermissions user_permissions = 1;
87 message GrantRequest {
88 required UserPermission user_permission = 1;
89 optional bool merge_existing_permissions = 2 [default = false];
92 message GrantResponse {
95 message RevokeRequest {
96 required UserPermission user_permission = 1;
99 message RevokeResponse {
102 message GetUserPermissionsRequest {
103 optional Permission.Type type = 1;
104 optional TableName table_name = 2;
105 optional bytes namespace_name = 3;
106 optional bytes column_family = 4;
107 optional bytes column_qualifier = 5;
108 optional bytes user_name = 6;
111 message GetUserPermissionsResponse {
112 repeated UserPermission user_permission = 1;
115 message CheckPermissionsRequest {
116 repeated Permission permission = 1;
119 message CheckPermissionsResponse {
122 message HasUserPermissionsRequest {
123 optional bytes user_name = 1;
124 repeated Permission permission = 2;
127 message HasUserPermissionsResponse {
128 repeated bool has_user_permission = 1;
131 service AccessControlService {
132 rpc Grant(GrantRequest)
133 returns (GrantResponse);
135 rpc Revoke(RevokeRequest)
136 returns (RevokeResponse);
138 rpc GetUserPermissions(GetUserPermissionsRequest)
139 returns (GetUserPermissionsResponse);
141 rpc CheckPermissions(CheckPermissionsRequest)
142 returns (CheckPermissionsResponse);