Andreea Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 1 | syntax = "proto2"; |
| 2 | |
| 3 | option optimize_for = LITE_RUNTIME; |
| 4 | |
Andreea Costinas | aae9738 | 2020-05-05 13:31:58 +0200 | [diff] [blame] | 5 | package system_proxy.worker; |
Andreea Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 6 | |
Andreea Costinas | db2cbee | 2020-06-15 11:43:44 +0200 | [diff] [blame] | 7 | // The protection space determines the domain over which credentials can |
| 8 | // be automatically applied (defined in RFC7235 , section 2.2). |
| 9 | message 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 Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 19 | message Credentials { |
| 20 | optional string username = 1; |
| 21 | optional string password = 2; |
Andreea Costinas | db2cbee | 2020-06-15 11:43:44 +0200 | [diff] [blame] | 22 | optional ProtectionSpace protection_space = 3; |
Andreea Costinas | cc4d54e | 2020-10-19 15:46:25 +0200 | [diff] [blame] | 23 | // 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 Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | message 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 | |
| 36 | message LogRequest { |
| 37 | optional string message = 1; |
| 38 | } |
| 39 | |
| 40 | message ProxyResolutionRequest { |
Andreea Costinas | 5862b10 | 2020-03-19 14:45:36 +0100 | [diff] [blame] | 41 | optional string target_url = 1; |
Andreea Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | message ProxyResolutionReply { |
Andreea Costinas | 5862b10 | 2020-03-19 14:45:36 +0100 | [diff] [blame] | 45 | 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 Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 51 | } |
| 52 | |
Andreea Costinas | db2cbee | 2020-06-15 11:43:44 +0200 | [diff] [blame] | 53 | message AuthRequiredRequest { |
| 54 | optional ProtectionSpace protection_space = 1; |
Andreea Costinas | ed9e612 | 2020-08-12 12:06:19 +0200 | [diff] [blame] | 55 | // 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 Costinas | db2cbee | 2020-06-15 11:43:44 +0200 | [diff] [blame] | 59 | } |
| 60 | |
Andreea Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 61 | message WorkerRequest { |
| 62 | oneof params { |
| 63 | LogRequest log_request = 1; |
| 64 | ProxyResolutionRequest proxy_resolution_request = 2; |
Andreea Costinas | db2cbee | 2020-06-15 11:43:44 +0200 | [diff] [blame] | 65 | AuthRequiredRequest auth_required_request = 3; |
Andreea Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 66 | } |
| 67 | } |
| 68 | |
Andreea Costinas | 922fbaf | 2020-05-28 11:55:22 +0200 | [diff] [blame] | 69 | message 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 Costinas | e9c7359 | 2020-07-17 15:27:54 +0200 | [diff] [blame] | 77 | message ClearUserCredentials {} |
| 78 | |
Andreea Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 79 | message WorkerConfigs { |
| 80 | oneof params { |
| 81 | Credentials credentials = 1; |
| 82 | // The local proxy listening address. |
| 83 | SocketAddress listening_address = 2; |
Andreea Costinas | 5862b10 | 2020-03-19 14:45:36 +0100 | [diff] [blame] | 84 | ProxyResolutionReply proxy_resolution_reply = 3; |
Andreea Costinas | 922fbaf | 2020-05-28 11:55:22 +0200 | [diff] [blame] | 85 | KerberosConfig kerberos_config = 4; |
Andreea Costinas | e9c7359 | 2020-07-17 15:27:54 +0200 | [diff] [blame] | 86 | ClearUserCredentials clear_user_credentials = 5; |
Andreea Costinas | c7d5ad0 | 2020-03-09 09:41:51 +0100 | [diff] [blame] | 87 | } |
| 88 | } |