blob: f2f599341308f87392fb55aff9f73fc0bf45d4ba [file] [log] [blame]
Andreea Costinasc7d5ad02020-03-09 09:41:51 +01001syntax = "proto2";
2
3option optimize_for = LITE_RUNTIME;
4
Andreea Costinasaae97382020-05-05 13:31:58 +02005package system_proxy.worker;
Andreea Costinasc7d5ad02020-03-09 09:41:51 +01006
Andreea Costinasdb2cbee2020-06-15 11:43:44 +02007// The protection space determines the domain over which credentials can
8// be automatically applied (defined in RFC7235 , section 2.2).
9message ProtectionSpace {
10 // The origin of the URL of the web proxy server issuing
11 // the challenge, formatted as scheme://url:port.
12 optional string origin = 1;
13 // The case-sensitive realm string of the challenge.
14 optional string realm = 2;
15 // The authentication scheme that can be basic, digest or NTLM.
16 optional string scheme = 3;
17}
18
Andreea Costinasc7d5ad02020-03-09 09:41:51 +010019message Credentials {
20 optional string username = 1;
21 optional string password = 2;
Andreea Costinasdb2cbee2020-06-15 11:43:44 +020022 optional ProtectionSpace protection_space = 3;
Andreea Costinascc4d54e2020-10-19 15:46:25 +020023 // Authentication schemes for which policy set credentials can be
24 // automatically applied. Valid values are 'basic', 'digest' and 'ntlm'.
25 repeated string policy_credentials_auth_schemes = 4;
Andreea Costinasc7d5ad02020-03-09 09:41:51 +010026}
27
28message SocketAddress {
29 // A listening ipv4 address for the local proxy server, serialized in
30 // network-byte-order.
31 optional uint32 addr = 1;
32 // This value should fit in a uint16_t.
33 optional uint32 port = 2;
34}
35
36message LogRequest {
37 optional string message = 1;
38}
39
40message ProxyResolutionRequest {
Andreea Costinas5862b102020-03-19 14:45:36 +010041 optional string target_url = 1;
Andreea Costinasc7d5ad02020-03-09 09:41:51 +010042}
43
44message ProxyResolutionReply {
Andreea Costinas5862b102020-03-19 14:45:36 +010045 optional string target_url = 1;
46 // An ordered list of proxy servers, at least one in size, with the last
47 // element always being the direct option. The format of the strings is
48 // scheme://host:port with the last element being "direct://". The only
49 // schemes supported at the moment are "http" and "direct".
50 repeated string proxy_servers = 2;
Andreea Costinasc7d5ad02020-03-09 09:41:51 +010051}
52
Andreea Costinasdb2cbee2020-06-15 11:43:44 +020053message AuthRequiredRequest {
54 optional ProtectionSpace protection_space = 1;
Andreea Costinased9e6122020-08-12 12:06:19 +020055 // If true, it means that the credentials previously acquired for proxy
56 // authentication are incorrect. This should force the user to re-enter the
57 // credentials in the system authentication dialogue.
58 optional bool bad_cached_credentials = 2;
Andreea Costinasdb2cbee2020-06-15 11:43:44 +020059}
60
Andreea Costinasc7d5ad02020-03-09 09:41:51 +010061message WorkerRequest {
62 oneof params {
63 LogRequest log_request = 1;
64 ProxyResolutionRequest proxy_resolution_request = 2;
Andreea Costinasdb2cbee2020-06-15 11:43:44 +020065 AuthRequiredRequest auth_required_request = 3;
Andreea Costinasc7d5ad02020-03-09 09:41:51 +010066 }
67}
68
Andreea Costinas922fbaf2020-05-28 11:55:22 +020069message KerberosConfig {
70 optional bool enabled = 1;
71 // Path to the Kerberos credential cache.
72 optional bytes krb5cc_path = 2;
73 // Path to the Kerberos configuration data.
74 optional bytes krb5conf_path = 3;
75}
76
Andreea Costinase9c73592020-07-17 15:27:54 +020077message ClearUserCredentials {}
78
Andreea Costinasc7d5ad02020-03-09 09:41:51 +010079message WorkerConfigs {
80 oneof params {
81 Credentials credentials = 1;
82 // The local proxy listening address.
83 SocketAddress listening_address = 2;
Andreea Costinas5862b102020-03-19 14:45:36 +010084 ProxyResolutionReply proxy_resolution_reply = 3;
Andreea Costinas922fbaf2020-05-28 11:55:22 +020085 KerberosConfig kerberos_config = 4;
Andreea Costinase9c73592020-07-17 15:27:54 +020086 ClearUserCredentials clear_user_credentials = 5;
Andreea Costinasc7d5ad02020-03-09 09:41:51 +010087 }
88}