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.protobuf.generated";
22 option java_outer_classname = "AuthenticationProtos";
23 option java_generic_services = true;
24 option java_generate_equals_and_hash = true;
25 option optimize_for = SPEED;
27 message AuthenticationKey {
28 required int32 id = 1;
29 required int64 expiration_date = 2;
30 required bytes key = 3;
34 message TokenIdentifier {
38 required Kind kind = 1;
39 required bytes username = 2;
40 required int32 key_id = 3;
41 optional int64 issue_date = 4;
42 optional int64 expiration_date = 5;
43 optional int64 sequence_number = 6;
47 // Serialization of the org.apache.hadoop.security.token.Token class
48 // Note that this is a Hadoop class, so fields may change!
50 // the TokenIdentifier in serialized form
51 // Note: we can't use the protobuf directly because the Hadoop Token class
52 // only stores the serialized bytes
53 optional bytes identifier = 1;
54 optional bytes password = 2;
55 optional bytes service = 3;
59 // RPC request & response messages
60 message GetAuthenticationTokenRequest {
63 message GetAuthenticationTokenResponse {
64 optional Token token = 1;
67 message WhoAmIRequest {
70 message WhoAmIResponse {
71 optional string username = 1;
72 optional string auth_method = 2;
77 service AuthenticationService {
78 rpc GetAuthenticationToken(GetAuthenticationTokenRequest)
79 returns (GetAuthenticationTokenResponse);
81 rpc WhoAmI(WhoAmIRequest)
82 returns (WhoAmIResponse);