-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[extension/opamp] TLS config loaded even for insecure schemes (ws/http) #39515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Self-assign |
akshays-19
pushed a commit
to akshays-19/opentelemetry-collector-contrib
that referenced
this issue
Apr 23, 2025
…pen-telemetry#39516) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Loads TLS config for the OpAMP Extension's OpAMP agent only if the `server::ws::endpoint`/`server::http::endpoint` config is set to a URL with scheme `wss`/`https`. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#39515 <!--Describe what testing was performed and which tests were added.--> #### Testing - Added unit tests - Tested manually with the steps described in **Steps to Reproduce** in open-telemetry#39515 <!--Please delete paragraphs that you did not use before submitting.-->
Fiery-Fenix
pushed a commit
to Fiery-Fenix/opentelemetry-collector-contrib
that referenced
this issue
Apr 24, 2025
…pen-telemetry#39516) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Loads TLS config for the OpAMP Extension's OpAMP agent only if the `server::ws::endpoint`/`server::http::endpoint` config is set to a URL with scheme `wss`/`https`. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#39515 <!--Describe what testing was performed and which tests were added.--> #### Testing - Added unit tests - Tested manually with the steps described in **Steps to Reproduce** in open-telemetry#39515 <!--Please delete paragraphs that you did not use before submitting.-->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component(s)
extension/opamp
What happened?
Description
The OpAMP Agent Extension's OpAMP agent applies TLS settings even when the
server::ws::endpoint
/server::http::endpoint
is set to a URL withws
/http
scheme, resulting in the client being unable to connect to a server that uses an insecure protocol.In the OpAMP Supervisor, a similar issue was addressed by loading the agent's TLS settings conditionally:
opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/supervisor.go
Lines 630 to 641 in 2d91302
A similar approach can be taken here.
Steps to Reproduce
Start an OpAMP server without TLS. If using the
opamp-go
example server, this can be done by replacing this line with:Run the collector with the provided config from the OpenTelemetry Collector configuration section below:
Expected Result
The collector connects to the OpAMP server.
Actual Result
The collector fails to connect to the OpAMP server.
It only connects if providing TLS config
insecure: true
:Collector version
v0.124.1
Environment information
Environment
OS: macOS Sequoia 15.4.1
Compiler: go1.24.2 darwin/arm64
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: