From 203ddedacd3b091f51dbf11fe399e5a60b254e5d Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Tue, 22 Oct 2024 16:53:38 -0700 Subject: [PATCH 1/2] Split ProxyConnectionSettings into its own PR --- proto/opamp.proto | 24 +++++++++++++++++++ specification.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/proto/opamp.proto b/proto/opamp.proto index 2108f9d..0b1636a 100644 --- a/proto/opamp.proto +++ b/proto/opamp.proto @@ -327,6 +327,10 @@ message OpAMPConnectionSettings { // Optional connection specific TLS settings. // Status: [Development] TLSConnectionSettings tls = 5; + + // Optional connection specific proxy settings. + // Status: [Development] + ProxyConnectionSettings proxy = 6; } // The TelemetryConnectionSettings message is a collection of fields which comprise an @@ -357,6 +361,10 @@ message TelemetryConnectionSettings { // Optional connection specific TLS settings. // Status: [Development] TLSConnectionSettings tls = 4; + + // Optional connection specific proxy settings. + // Status: [Development] + ProxyConnectionSettings proxy = 5; } // The OtherConnectionSettings message is a collection of fields which comprise an @@ -406,6 +414,10 @@ message OtherConnectionSettings { // Optional connection specific TLS settings. // Status: [Development] TLSConnectionSettings tls = 5; + + // Optional connection specific proxy settings. + // Status: [Development] + ProxyConnectionSettings proxy = 6; } @@ -432,6 +444,18 @@ message TLSConnectionSettings { repeated string cipher_suites = 6; } +// Status: [Development] +message ProxyConnectionSettings { + // A URL, host:port or some other destination specifier. + string destination_endpoint = 1; + + // Optional headers to send to proxies during CONNECT requests. + // These headers can be ignored for non-HTTP based proxies. + // For example: + // key="Authorization", Value="Basic YWxhZGRpbjpvcGVuc2VzYW1l". + Headers connect_headers = 2; +} + // Status: [Beta] message Headers { repeated Header headers = 1; diff --git a/specification.md b/specification.md index ffbd177..201a176 100644 --- a/specification.md +++ b/specification.md @@ -115,18 +115,24 @@ Status: [Beta] - [OpAMPConnectionSettings.certificate](#opampconnectionsettingscertificate) - [OpAMPConnectionSettings.heartbeat_interval_seconds](#opampconnectionsettingsheartbeat_interval_seconds) - [OpAMPConnectionSettings.tls](#opampconnectionsettingstls) + - [OpAMPConnectionSettings.proxy](#opampconnectionsettingsproxy) + [TelemetryConnectionSettings](#telemetryconnectionsettings) - [TelemetryConnectionSettings.destination_endpoint](#telemetryconnectionsettingsdestination_endpoint) - [TelemetryConnectionSettings.headers](#telemetryconnectionsettingsheaders) - [TelemetryConnectionSettings.certificate](#telemetryconnectionsettingscertificate) - [TelemetryConnectionSettings.tls](#telemetryconnectionsettingstls) + - [TelemetryConnectionSettings.proxy](#telemetryconnectionsettingsproxy) + [OtherConnectionSettings](#otherconnectionsettings) - [OtherConnectionSettings.destination_endpoint](#otherconnectionsettingsdestination_endpoint) - [OtherConnectionSettings.headers](#otherconnectionsettingsheaders) - [OtherConnectionSettings.certificate](#otherconnectionsettingscertificate) - [OtherConnectionSettings.other_settings](#otherconnectionsettingsother_settings) - [OtherConnectionSettings.tls](#otherconnectionsettingstls) + - [OtherConnectionSettings.proxy](#otherconnectionsettingsproxy) + [TLSConnectionSettings Message](#tlsconnectionsettings-message) + + [ProxyConnectionSettings Message](#proxyconnectionsettings-message) + - [ProxyConnectionSettings.destination_endpoint](#proxyconnectionsettingsdestination_endpoint) + - [ProxyConnectionSettings.connect_headers](#proxyconnectionsettingsconnect_headers) + [Headers Message](#headers-message) + [TLSCertificate Message](#tlscertificate-message) - [TLSCertificate.cert](#tlscertificatecert) @@ -1909,6 +1915,7 @@ message OpAMPConnectionSettings { TLSCertificate certificate = 3; uint64 heartbeat_interval_seconds = 4; TLSConnectionSettings tls = 5; + ProxyConnectionSettings proxy = 6; } ``` @@ -1990,6 +1997,12 @@ Status: [Development] Optional OpAMP specific TLS settings. +##### OpAMPConnectionSettings.proxy + +Status: [Development] + +Optional OpAMP specific proxy settings. + #### TelemetryConnectionSettings The TelemetryConnectionSettings message is a collection of fields which comprise an @@ -2002,6 +2015,7 @@ message TelemetryConnectionSettings { Headers headers = 2; TLSCertificate certificate = 3; TLSConnectionSettings tls = 4; + ProxyConnectionSettings proxy = 5; } ``` @@ -2034,6 +2048,12 @@ Status: [Development] Optional telemetry specific TLS settings. +##### TelemetryConnectionSettings.proxy + +Status: [Development] + +Optional telemetry specific proxy settings. + #### OtherConnectionSettings The OtherConnectionSettings message is a collection of fields which comprise an @@ -2064,6 +2084,7 @@ message OtherConnectionSettings { TLSCertificate certificate = 3; map other_settings = 4; TLSConnectionSettings tls = 5; + ProxyConnectionSettings proxy = 6; } ``` @@ -2099,6 +2120,12 @@ Status: [Development] Optional connection specific TLS settings. +##### OtherConnectionSettings.proxy + +Status: [Development] + +Optional connection specific proxy settings. + #### TLSConnectionSettings Message Status: [Development] @@ -2119,6 +2146,38 @@ message TLSConnectionSettings { } ``` +#### ProxyConnectionSettings Message + +Status: [Development] + +The message carries optional proxy settings that are used to configure a +client's connection. If the Agent is able to validate the connection settings, +the Agent SHOULD forget any previous proxy settings. If this message is not +included, the client SHOULD use the agent's default proxy settings for the +connection. + +If the proxy requires an mTLS certificate, or any TLS settings the Client +SHOULD use the associated connection's settings. + +```protobuf +message ProxyConnectionSettings { + string destination_endpoint = 1; + Headers connect_headers = 2; +} +``` + +##### ProxyConnectionSettings.destination_endpoint + +The destination_endpoint MUST be a non-empty URL, for example: +`https://example.com:8443` or `127.0.0.1:8443` + +##### ProxyConnectionSettings.connect_headers + +Option headers the Client should set for HTTP based proxies initial CONNECT +request. Other proxy types, such as SOCKS5 may ignore these headers. +For example: +key="Authorization", Value="Basic YWxhZGRpbjpvcGVuc2VzYW1l". + #### Headers Message ```protobuf From ea9c833cb67ae6f05475b3578fa3fc3b89be72b3 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Thu, 8 May 2025 11:09:34 -0600 Subject: [PATCH 2/2] Review feddback --- proto/opamp.proto | 2 +- specification.md | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/proto/opamp.proto b/proto/opamp.proto index 0b1636a..b5fc6cf 100644 --- a/proto/opamp.proto +++ b/proto/opamp.proto @@ -447,7 +447,7 @@ message TLSConnectionSettings { // Status: [Development] message ProxyConnectionSettings { // A URL, host:port or some other destination specifier. - string destination_endpoint = 1; + string url = 1; // Optional headers to send to proxies during CONNECT requests. // These headers can be ignored for non-HTTP based proxies. diff --git a/specification.md b/specification.md index 201a176..d06427c 100644 --- a/specification.md +++ b/specification.md @@ -131,7 +131,7 @@ Status: [Beta] - [OtherConnectionSettings.proxy](#otherconnectionsettingsproxy) + [TLSConnectionSettings Message](#tlsconnectionsettings-message) + [ProxyConnectionSettings Message](#proxyconnectionsettings-message) - - [ProxyConnectionSettings.destination_endpoint](#proxyconnectionsettingsdestination_endpoint) + - [ProxyConnectionSettings.url](#proxyconnectionsettingsurl) - [ProxyConnectionSettings.connect_headers](#proxyconnectionsettingsconnect_headers) + [Headers Message](#headers-message) + [TLSCertificate Message](#tlscertificate-message) @@ -2153,23 +2153,23 @@ Status: [Development] The message carries optional proxy settings that are used to configure a client's connection. If the Agent is able to validate the connection settings, the Agent SHOULD forget any previous proxy settings. If this message is not -included, the client SHOULD use the agent's default proxy settings for the -connection. +included, client SHOULD assume the settings are unchanged and continue using +existing settings. If the proxy requires an mTLS certificate, or any TLS settings the Client SHOULD use the associated connection's settings. ```protobuf message ProxyConnectionSettings { - string destination_endpoint = 1; + string url = 1; Headers connect_headers = 2; } ``` -##### ProxyConnectionSettings.destination_endpoint +##### ProxyConnectionSettings.url -The destination_endpoint MUST be a non-empty URL, for example: -`https://example.com:8443` or `127.0.0.1:8443` +The url MUST be non-empty, for example: `https://example.com:8443` or +`127.0.0.1:8443`. ##### ProxyConnectionSettings.connect_headers