Skip to content

postgres: add ability to terminate SSL at Envoy#14634

Merged
lizan merged 25 commits intoenvoyproxy:mainfrom
cpakulski:issue/10942_1
Feb 11, 2021
Merged

postgres: add ability to terminate SSL at Envoy#14634
lizan merged 25 commits intoenvoyproxy:mainfrom
cpakulski:issue/10942_1

Conversation

@cpakulski
Copy link
Copy Markdown
Contributor

Commit Message:
Adds ability to use starttls transport socket to terminate SSL at Envoy and pass unencrypted traffic upstream to Postgres server.

Additional Description:
Risk Level: Low
Testing: Added unit and integration tests.
Docs Changes: Yes.
Release Notes: Yes.
Fixes #10942

cpakulski and others added 8 commits January 4, 2021 17:18
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Co-authored-by: Fabrízio de Royes Mello <fabrizio@ongres.com>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
API shepherd assignee is @htuch
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #14634 was opened by cpakulski.

see: more, trace.

Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
@cpakulski cpakulski marked this pull request as ready for review January 12, 2021 02:59
@cpakulski cpakulski requested a review from dio as a code owner January 12, 2021 02:59
@fabriziomello
Copy link
Copy Markdown
Contributor

@cpakulski As you already know I did a lot of tests against this new implementation using Postgres regression test suite. But need to test more cases: replication and authentication using client certificates (testing it today).

Copy link
Copy Markdown
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

/lgtm api

Base automatically changed from master to main January 15, 2021 23:02
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
@cpakulski
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Check envoy-presubmit isn't fully completed, but will still attempt retrying.
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #14634 (comment) was created by @cpakulski.

see: more, trace.

@cpakulski
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #14634 (comment) was created by @cpakulski.

see: more, trace.

Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
@cpakulski cpakulski requested a review from dio February 1, 2021 22:41
Copy link
Copy Markdown
Member

@dio dio 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. Observed bad merging in the version history.

* http: change frame flood and abuse checks to the upstream HTTP/2 codec to ON by default. It can be disabled by setting the `envoy.reloadable_features.upstream_http2_flood_checks` runtime key to false.
* overload: add support for scaling :ref:`transport connection timeouts<envoy_v3_api_enum_value_config.overload.v3.ScaleTimersOverloadActionConfig.TimerType.TRANSPORT_SOCKET_CONNECT>`. This can be used to reduce the TLS handshake timeout in response to overload.
* postgres: added ability to :ref:`terminate SSL<envoy_v3_api_field_extensions.filters.network.postgres_proxy.v3alpha.PostgresProxy.terminate_ssl>`.
* server: added :ref:`fips_mode <statistics>` statistic.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Bad merging?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Corrected. Thanks for catching it!

@fabriziomello
Copy link
Copy Markdown
Contributor

And all Postgres regression are OK with last commits of this PR: https://github.com/fabriziomello/envoy-postgres-regression/runs/1810089899?check_suite_focus=true

Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
@cpakulski cpakulski requested a review from dio February 2, 2021 21:10
@dio
Copy link
Copy Markdown
Member

dio commented Feb 2, 2021

@cpakulski sorry, another sync to main?

Signed-off-by: Christoph Pakulski <christoph@tetrate.io>
Copy link
Copy Markdown
Member

@dio dio left a comment

Choose a reason for hiding this comment

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

Thanks, awesome work! @fabriziomello I think we need to pull in the regression test to be part of the envoy test suite, as mentioned before, probably verify_examples is one of the possible places to do so.

@cpakulski
Copy link
Copy Markdown
Contributor Author

Thanks @dio for reviewing and valuable comments!

@cpakulski
Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #14634 (comment) was created by @cpakulski.

see: more, trace.

@fabriziomello
Copy link
Copy Markdown
Contributor

Thanks, awesome work! @fabriziomello I think we need to pull in the regression test to be part of the envoy test suite, as mentioned before, probably verify_examples is one of the possible places to do so.

Are you meant here? https://github.com/envoyproxy/envoy/tree/main/examples/postgres

@cpakulski cpakulski requested a review from lizan February 3, 2021 23:05
@dio
Copy link
Copy Markdown
Member

dio commented Feb 5, 2021

@fabriziomello yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Postgres filter: implement Postgres SSL termination and monitoring

5 participants