blob: 5a7856bb73dc3c1d306efdf2aed6b25e014c7aa6 [file] [log] [blame]
Naveen Sampath04696f72022-06-13 15:19:14 +05301syntax = "proto3";
2package authpb;
3
4import "gogoproto/gogo.proto";
5
Abhay Kumarfe505f22025-11-10 14:16:31 +00006option go_package = "go.etcd.io/etcd/api/v3/authpb";
7
Naveen Sampath04696f72022-06-13 15:19:14 +05308option (gogoproto.marshaler_all) = true;
9option (gogoproto.sizer_all) = true;
10option (gogoproto.unmarshaler_all) = true;
11option (gogoproto.goproto_getters_all) = false;
12option (gogoproto.goproto_enum_prefix_all) = false;
13
Abhay Kumarfe505f22025-11-10 14:16:31 +000014message UserAddOptions {
15 bool no_password = 1;
16};
17
Naveen Sampath04696f72022-06-13 15:19:14 +053018// User is a single entry in the bucket authUsers
19message User {
20 bytes name = 1;
21 bytes password = 2;
22 repeated string roles = 3;
Abhay Kumarfe505f22025-11-10 14:16:31 +000023 UserAddOptions options = 4;
Naveen Sampath04696f72022-06-13 15:19:14 +053024}
25
26// Permission is a single entity
27message Permission {
28 enum Type {
29 READ = 0;
30 WRITE = 1;
31 READWRITE = 2;
32 }
33 Type permType = 1;
34
35 bytes key = 2;
36 bytes range_end = 3;
37}
38
39// Role is a single entry in the bucket authRoles
40message Role {
41 bytes name = 1;
42
43 repeated Permission keyPermission = 2;
44}