Proposal to bind gRPC API to localhost by default#2669
Open
pavel-odintsov wants to merge 5 commits intoosrg:masterfrom
Open
Proposal to bind gRPC API to localhost by default#2669pavel-odintsov wants to merge 5 commits intoosrg:masterfrom
pavel-odintsov wants to merge 5 commits intoosrg:masterfrom
Conversation
Member
|
This is a big change since GoBGP accepts any from day one. But I guess that the more secure default configuration is better. So I could merge this with the major version updated. |
|
Query: how to correctly specify binding to both ::1 and 127.0.0.1? Systems where IPv6 is disabled via |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
I just pulled latest gRPC 3.15.0 and noticed that it binds gRPC to 0.0.0.0 / :: by default and exposes API to wild world of the Internet:
As you can see I did not use any arguments or options for it. I'm pretty sure that majority of new deployments starts similar way and they will be vulnerable to attacks and will be insecure by default.
We discussed this issue while ago and it was partially addressed here by providing command line argument to specify API bind host (--api-hosts="::1"): #796
In this PR I changed default wildcard bind to :: which listens on all available interfaces to more specific IPv6 localhost ::1 which makes GoBGP secure by default.
Some may argue that not all servers have IPv6 connectivity but IPv6 localhost is available on all modern distributions.
Thank you!