blob: 001d33435483026bcf45c680d8763bc48da7bd42 [file] [log] [blame]
Scott Bakereee8dd82019-09-24 12:52:34 -07001syntax = "proto3";
2package authpb;
3
4import "gogoproto/gogo.proto";
5
6option (gogoproto.marshaler_all) = true;
7option (gogoproto.sizer_all) = true;
8option (gogoproto.unmarshaler_all) = true;
9option (gogoproto.goproto_getters_all) = false;
10option (gogoproto.goproto_enum_prefix_all) = false;
11
12// User is a single entry in the bucket authUsers
13message User {
14 bytes name = 1;
15 bytes password = 2;
16 repeated string roles = 3;
17}
18
19// Permission is a single entity
20message Permission {
21 enum Type {
22 READ = 0;
23 WRITE = 1;
24 READWRITE = 2;
25 }
26 Type permType = 1;
27
28 bytes key = 2;
29 bytes range_end = 3;
30}
31
32// Role is a single entry in the bucket authRoles
33message Role {
34 bytes name = 1;
35
36 repeated Permission keyPermission = 2;
37}