@@ -94,28 +94,88 @@ message SessionInfo {
9494 // - multiple sessions over a single SSH connection
9595 // - multiple channels over a single gRPC connection
9696 string channel_id = 6;
97+
98+ // optional name of the tty, eg: console0, aux0, vty0, pty0. If the
99+ // connection is a serial line, such as a console, the adddress,
100+ // port, and protocol fields above will be omitted.
101+ string tty = 7;
102+
103+ // session status
104+ enum SessionStatus {
105+ SESSION_STATUS_UNSPECIFIED = 0;
106+ SESSION_STATUS_LOGIN = 1; // "start"
107+ SESSION_STATUS_LOGOUT = 2; // "stop"
108+ SESSION_STATUS_ONCE = 3; // simultaneous login, cmd, logout
109+ SESSION_STATUS_ENABLE = 4; // change privilege level
110+ SESSION_STATUS_IDLE = 5; // "watchog"
111+ }
112+ SessionStatus status = 8;
113+
114+ // User details
115+ UserDetail user = 9;
116+
117+ // Authentication details
118+ AuthenDetail authen = 10;
97119}
98120
99- // Details of authentication - for gRPC or shell/vendor-CLI.
100- message AuthDetail {
121+ // Details of a user
122+ message UserDetail {
101123 // Identity string is used to identify the user that executed the
102124 // command. For instance, it could be the spiffe-id in the case of
103125 // gRPC or unix-style user-name in the case of shell/vendor-CLI.
126+ // This might be omitted if the username is unknown, such as
127+ // accounting a login that terminated before a username was received.
104128 string identity = 1;
105129
106130 // Privilege level configured on the system.
107131 uint32 privilege_level = 2;
132+ }
133+
134+ // Details of authentication
135+ // While some authentication mechanisms authenticate the client only
136+ // once, at connection time, such as mTLS and shell, others authenticate
137+ // the client for each service_request, such as gRPC w/o mTLS or HTTP.
138+ message AuthenDetail {
139+ // authentication type
140+ enum AuthenType {
141+ AUTHEN_TYPE_UNSPECIFIED = 0;
142+ AUTHEN_TYPE_NONE = 1;
143+ AUTHEN_TYPE_PASSWORD = 2;
144+ AUTHEN_TYPE_SSHKEY = 3;
145+ AUTHEN_TYPE_SSHCERT = 4;
146+ AUTHEN_TYPE_TLSCERT = 5;
147+ AUTHEN_TYPE_PAP = 6;
148+ AUTHEN_TYPE_CHAP = 7;
149+ }
150+ AuthenType type = 1;
108151
109152 // authentication status
110153 enum AuthenStatus {
111154 AUTHEN_STATUS_UNSPECIFIED = 0;
112- AUTHEN_STATUS_PERMIT = 1;
113- AUTHEN_STATUS_DENY = 2;
155+ AUTHEN_STATUS_SUCCESS = 1;
156+ AUTHEN_STATUS_FAIL = 2;
157+ AUTHEN_STATUS_ERROR = 3;
158+ }
159+ AuthenStatus status = 2;
160+
161+ // In case of STATUS_FAIL/_ERROR, detail of the cause
162+ string cause = 3;
163+ }
164+
165+ // Details of authorization - all service_requests
166+ message AuthorDetail {
167+ // authorization status
168+ enum AuthorStatus {
169+ AUTHOR_STATUS_UNSPECIFIED = 0;
170+ AUTHOR_STATUS_PERMIT = 1;
171+ AUTHOR_STATUS_DENY = 2;
172+ AUTHOR_STATUS_ERROR = 3;
114173 }
115- AuthenStatus status = 3 ;
174+ AuthorStatus status = 1 ;
116175
117- // In case of STATUS_DENY, cause for the deny
118- string deny_cause = 4;
176+ // Detail of the status, which might include the policy that caused
177+ // a PERMIT or DENY.
178+ string detail = 2;
119179}
120180
121181// Command details for shell/vendor-CLI
@@ -208,12 +268,12 @@ message RecordResponse {
208268 GrpcService grpc_service = 5;
209269 }
210270
211- // Authentication related details
212- AuthDetail authen = 7 ;
271+ // Authorization details
272+ AuthorDetail author = 6 ;
213273
214274 // Optional repeated task_id that represent tasks that were used to
215275 // accomplish the request on the system.
216- repeated string task_ids = 32 ;
276+ repeated string task_ids = 7 ;
217277}
218278
219279// RecordRequest, requests a starting point for records to be sent to the
0 commit comments