Skip to content
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

Replace or add loopback address in Collector OTLP examples #3847

Merged
merged 15 commits into from
Jan 31, 2024

Conversation

theletterf
Copy link
Member

@theletterf theletterf commented Jan 23, 2024

Fixes #3839

To check:

  • Do we want to add a comment to all YAML edits? What should it say?
  • Do we need to change this in instrumentation settings examples?
  • Do we need to change localhost to 0.0.0.0 elsewhere in Collector configs?

Preview, e.g., see: https://deploy-preview-3847--opentelemetry.netlify.app/docs/collector/configuration/#endpoint-0.0.0.0-warning

@theletterf theletterf requested review from a team and mx-psi and removed request for a team January 23, 2024 10:42
@theletterf theletterf self-assigned this Jan 23, 2024
@svrnm
Copy link
Member

svrnm commented Jan 23, 2024

If I understand the issue correctly this is only for receivers

@mx-psi
Copy link
Member

mx-psi commented Jan 23, 2024

This is only on servers exposed by the OpenTelemetry Collector (the vast majority of which are receivers, we also have a couple extensions that may be featured in the docs). The intent is to mitigate https://cwe.mitre.org/data/definitions/1327.html

@theletterf
Copy link
Member Author

@svrnm @mx-psi I reverted all changes applied to things that are not receivers. Other than OTLP addresses I couldn't find other instances of receiver listening on localhost in the Collector docs.

I'm also unsure about adding a long note at all. I think this change can be transparent until the new standard comes into effect.

@theletterf theletterf requested a review from svrnm January 23, 2024 11:43
@svrnm
Copy link
Member

svrnm commented Jan 25, 2024

I'm also unsure about adding a long note at all. I think this change can be transparent until the new standard comes into effect.

My suggestion is that we have something like this:

  otlp:
    protocols:
      grpc:
        # This will tell the collector to listen on all interfaces & addresses, 
        # make sure that you set this configuration to the value that is appropriate for your environment
        endpoint: 0.0.0.0:4317

Rational: The problem that we are facing is that the new default of the collector is implemented for security reasons, now we tell people to re-configure their collector again to that less secure setting, so we have to give them an indication that this setting has implications they need to be aware of, although this makes our documentation "ugly"

@theletterf theletterf requested review from a team and svrnm January 25, 2024 15:24
@theletterf
Copy link
Member Author

@svrnm I've reverted the changes you pointed out as wrong and added a compact note to the rest. PTAL

Copy link
Member

@svrnm svrnm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few more things to fix, but overall LGTM

content/en/docs/faas/lambda-collector.md Outdated Show resolved Hide resolved
content/en/docs/faas/lambda-collector.md Outdated Show resolved Hide resolved
content/en/docs/kubernetes/helm/collector.md Outdated Show resolved Hide resolved
content/en/docs/kubernetes/helm/collector.md Outdated Show resolved Hide resolved
@theletterf
Copy link
Member Author

Comments addressed! PTAL

@mx-psi
Copy link
Member

mx-psi commented Jan 31, 2024

Makes sense to me 👍 As I said above, fine for me to leave this to a different PR, but also fine to keep it here if okay with others :)

@theletterf
Copy link
Member Author

@chalin I echo @mx-psi. If you'd add the note with that same wording, that'd work for me.

@chalin chalin force-pushed the theletterf-set-localhost-zeroes-3839 branch from ee778d3 to c52e382 Compare January 31, 2024 10:16
@chalin
Copy link
Contributor

chalin commented Jan 31, 2024

@chalin I echo @mx-psi. If you'd add the note with that same wording, that'd work for me.

Added, see https://deploy-preview-3847--opentelemetry.netlify.app/docs/collector/configuration/#endpoint-0.0.0.0-warning.

Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If y'all agree with the added note, then the rest LGTM ✨

@theletterf
Copy link
Member Author

@chalin LGTM! Let's roll!

Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 on the operator examples.

@svrnm
Copy link
Member

svrnm commented Jan 31, 2024

awesome, this looks really good now. @mx-psi if you are happy as well we can merge :-)

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! :)

@svrnm svrnm merged commit 018acd8 into main Jan 31, 2024
16 checks passed
@svrnm svrnm deleted the theletterf-set-localhost-zeroes-3839 branch January 31, 2024 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs sig:collector sig-approval-missing Co-owning SIG didn't provide an approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explicitly set endpoint host to 0.0.0.0 in all Collector examples
6 participants