forked from ubuntu/authd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
authd.proto
196 lines (156 loc) · 3.58 KB
/
authd.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
syntax = "proto3";
package authd;
option go_package = "github.com/ubuntu/authd";
message Empty {
}
service PAM {
rpc AvailableBrokers(Empty) returns (ABResponse);
rpc GetPreviousBroker(GPBRequest) returns (GPBResponse);
rpc SelectBroker(SBRequest) returns (SBResponse);
rpc GetAuthenticationModes(GAMRequest) returns (GAMResponse);
rpc SelectAuthenticationMode(SAMRequest) returns (SAMResponse);
rpc IsAuthenticated(IARequest) returns (IAResponse);
rpc EndSession(ESRequest) returns (Empty);
rpc SetDefaultBrokerForUser(SDBFURequest) returns (Empty);
}
message GPBRequest {
string username = 1;
}
message GPBResponse {
string previous_broker = 1;
}
message ABResponse {
repeated BrokerInfo brokers_infos = 1;
message BrokerInfo {
string id = 1;
string name = 2;
optional string brand_icon = 3;
}
}
message StringResponse {
string msg = 1;
}
enum SessionMode {
UNDEFINED = 0;
AUTH = 1;
PASSWD = 2;
}
message SBRequest {
string broker_id = 1;
string username = 2;
string lang = 3;
SessionMode mode = 4;
}
message SBResponse {
string session_id = 1;
string encryption_key = 2;
}
message GAMRequest {
string session_id = 1;
repeated UILayout supported_ui_layouts = 2;
}
message UILayout {
string type = 1;
// common components.
optional string label = 2;
optional string button = 3;
optional string wait = 4;
// form only.
optional string entry = 5;
// qr code only.
optional string content = 6;
optional string code = 7;
}
message GAMResponse {
repeated AuthenticationMode authentication_modes = 1;
message AuthenticationMode {
string id = 1;
string label = 2;
}
}
message SAMRequest {
string session_id = 1;
string authentication_mode_id = 2;
}
message SAMResponse {
UILayout ui_layout_info = 1;
}
message IARequest {
string session_id = 1;
message AuthenticationData {
oneof item {
string challenge = 1;
string wait = 2;
string skip = 3;
}
}
AuthenticationData authentication_data = 2;
}
message IAResponse {
string access = 1;
string msg = 2;
}
message SDBFURequest {
string broker_id = 1;
string username = 2;
}
message ESRequest {
string session_id = 1;
}
service NSS {
rpc GetPasswdByName(GetPasswdByNameRequest) returns (PasswdEntry);
rpc GetPasswdByUID(GetByIDRequest) returns (PasswdEntry);
rpc GetPasswdEntries(Empty) returns (PasswdEntries);
rpc GetGroupByName(GetGroupByNameRequest) returns (GroupEntry);
rpc GetGroupByGID(GetByIDRequest) returns (GroupEntry);
rpc GetGroupEntries(Empty) returns (GroupEntries);
rpc GetShadowByName(GetShadowByNameRequest) returns (ShadowEntry);
rpc GetShadowEntries(Empty) returns (ShadowEntries);
}
message GetPasswdByNameRequest{
string name = 1;
bool shouldPreCheck = 2;
}
message GetGroupByNameRequest{
string name = 1;
}
message GetShadowByNameRequest{
string name = 1;
}
message GetByIDRequest{
uint32 id = 1;
}
message PasswdEntry {
string name = 1;
string passwd = 2;
uint32 uid = 3;
uint32 gid = 4;
string gecos = 5;
string homedir = 6;
string shell = 7;
}
message PasswdEntries {
repeated PasswdEntry entries = 1;
}
message GroupEntry {
string name = 1;
string passwd = 2;
uint32 gid = 3;
repeated string members = 4;
}
message GroupEntries {
repeated GroupEntry entries = 1;
}
message ShadowEntry {
string name = 1;
string passwd = 2;
int32 last_change = 3;
int32 change_min_days = 4;
int32 change_max_days = 5;
int32 change_warn_days = 6;
int32 change_inactive_days = 7;
int32 expire_date = 8;
}
message ShadowEntries {
repeated ShadowEntry entries = 1;
}