blob: 5a7856bb73dc3c1d306efdf2aed6b25e014c7aa6 [file] [log] [blame]
Abhay Kumar40252eb2025-10-13 13:25:53 +00001syntax = "proto3";
2package authpb;
3
4import "gogoproto/gogo.proto";
5
6option go_package = "go.etcd.io/etcd/api/v3/authpb";
7
8option (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
14message UserAddOptions {
15 bool no_password = 1;
16};
17
18// User is a single entry in the bucket authUsers
19message User {
20 bytes name = 1;
21 bytes password = 2;
22 repeated string roles = 3;
23 UserAddOptions options = 4;
24}
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}