Skip to content

Add support for PROXY protocol v2 in TCP listener#13540

Merged
hghaf099 merged 3 commits intohashicorp:mainfrom
remilapeyre:proxy-protocol-v2
Mar 8, 2022
Merged

Add support for PROXY protocol v2 in TCP listener#13540
hghaf099 merged 3 commits intohashicorp:mainfrom
remilapeyre:proxy-protocol-v2

Conversation

@remilapeyre
Copy link

I did not find tests for this so I added one trying to cover different
configurations to make sure I did not break something. As far as I know,
the behavior should be exactly the same as before except for one thing
when proxy_protocol_behavior is set to "deny_unauthorized", unauthorized
requests were previously silently reject because of https://github.com/armon/go-proxyproto/blob/7e956b284f0a/protocol.go#L81-L84
but it will now be logged.

Also fixes #9462 by adding
support for PROXY UNKNOWN for PROXY protocol v1.

Closes #3807

I did not find tests for this so I added one trying to cover different
configurations to make sure I did not break something. As far as I know,
the behavior should be exactly the same as before except for one thing
when proxy_protocol_behavior is set to "deny_unauthorized", unauthorized
requests were previously silently reject because of https://github.com/armon/go-proxyproto/blob/7e956b284f0a/protocol.go#L81-L84
but it will now be logged.

Also fixes hashicorp#9462 by adding
support for `PROXY UNKNOWN` for PROXY protocol v1.

Closes hashicorp#3807
@vercel vercel bot temporarily deployed to Preview – vault-storybook January 2, 2022 00:01 Inactive
@heatherezell
Copy link
Contributor

Hi @remilapeyre - please don't forget a changelog entry. :)

@vercel vercel bot temporarily deployed to Preview – vault-storybook January 10, 2022 22:25 Inactive
@hghaf099 hghaf099 added the core Issues and Pull-Requests specific to Vault Core label Feb 9, 2022
@hghaf099
Copy link
Contributor

@remilapeyre Thank you for submitting this PR. We would like to review and possibly merge it. Would you please rebase with main and resolve the conflicts?

@heatherezell
Copy link
Contributor

Hi @remilapeyre - we're super excited to get this reviewed, so could you take a look at the merge conflicts and we can move forward? Thanks! :)

@remilapeyre
Copy link
Author

Hi @remilapeyre - we're super excited to get this reviewed, so could you take a look at the merge conflicts and we can move forward? Thanks! :)

Hi @hsimon-hashicorp, all should be good now :)

@hghaf099 hghaf099 added this to the 1.10 milestone Mar 8, 2022
@hghaf099 hghaf099 merged commit 1d06d25 into hashicorp:main Mar 8, 2022
hghaf099 pushed a commit that referenced this pull request Mar 8, 2022
* Add support for PROXY protocol v2 in TCP listener

I did not find tests for this so I added one trying to cover different
configurations to make sure I did not break something. As far as I know,
the behavior should be exactly the same as before except for one thing
when proxy_protocol_behavior is set to "deny_unauthorized", unauthorized
requests were previously silently reject because of https://github.com/armon/go-proxyproto/blob/7e956b284f0a/protocol.go#L81-L84
but it will now be logged.

Also fixes #9462 by adding
support for `PROXY UNKNOWN` for PROXY protocol v1.

Closes #3807

* Add changelog
hghaf099 added a commit that referenced this pull request Mar 9, 2022
* Add support for PROXY protocol v2 in TCP listener

I did not find tests for this so I added one trying to cover different
configurations to make sure I did not break something. As far as I know,
the behavior should be exactly the same as before except for one thing
when proxy_protocol_behavior is set to "deny_unauthorized", unauthorized
requests were previously silently reject because of https://github.com/armon/go-proxyproto/blob/7e956b284f0a/protocol.go#L81-L84
but it will now be logged.

Also fixes #9462 by adding
support for `PROXY UNKNOWN` for PROXY protocol v1.

Closes #3807

* Add changelog

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues and Pull-Requests specific to Vault Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vault Proxy Protocol support is broken on Google Cloud PROXY Protocol v2 logging support

3 participants