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

HTTPS Termination #140

Merged
merged 42 commits into from
Jul 27, 2022
Merged

HTTPS Termination #140

merged 42 commits into from
Jul 27, 2022

Conversation

kate-osborn
Copy link
Contributor

This commit adds support for HTTPS listeners with a TLS mode of Terminate.
Multiple HTTPS listeners are supported provided their hostnames do not conflict.
Additionally, a gateway can have an HTTP and HTTPS listener with the same
hostname.

Limitations:

  • HTTPS listeners must listen on port 443
  • Supports a single reference to a Kubernetes Secret of type kubernetes.io/tls
  • Secret must be in the same namespace as the Gateway
  • Secret must be created before the HTTPRoutes are created
  • Secret rotation is not supported

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

Hi @kate-osborn Please see my review

internal/events/loop.go Outdated Show resolved Hide resolved
internal/manager/manager.go Outdated Show resolved Hide resolved
internal/nginx/config/template.go Outdated Show resolved Hide resolved
internal/state/graph.go Show resolved Hide resolved
internal/state/secrets.go Outdated Show resolved Hide resolved
internal/state/configuration_test.go Outdated Show resolved Hide resolved
internal/state/graph_test.go Outdated Show resolved Hide resolved
internal/state/graph_test.go Outdated Show resolved Hide resolved
internal/state/secrets_test.go Outdated Show resolved Hide resolved
internal/state/secrets_test.go Show resolved Hide resolved
This commit adds support for HTTPS listeners with a TLS mode of Terminate.
Multiple HTTPS listeners are supported provided their hostnames do not conflict.
Additionally, a gateway can have an HTTP and HTTPS listener with the same
hostname.

Limitations:
- HTTPS listeners must listen on port 443
- Supports a single reference to a Kubernetes Secret of type kubernetes.io/tls
- Secret must be in the same namespace as the Gateway
- Secret must be created before the HTTPRoutes are created
- Secret rotation is not supported
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

hi @kate-osborn
a few more suggestions and questions based on the new code

examples/advanced-routing/gateway.yaml Outdated Show resolved Hide resolved
internal/nginx/config/generator.go Outdated Show resolved Hide resolved
internal/state/change_processor_test.go Show resolved Hide resolved
internal/state/listener.go Show resolved Hide resolved
internal/state/secrets.go Show resolved Hide resolved
internal/state/secrets.go Show resolved Hide resolved
internal/state/secrets_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pleshakov pleshakov 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 comments/suggestions

internal/state/file_manager.go Show resolved Hide resolved
internal/state/secrets_test.go Outdated Show resolved Hide resolved
internal/state/secrets_test.go Outdated Show resolved Hide resolved
internal/state/secrets_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

👍

@kate-osborn kate-osborn merged commit 1e4b4d2 into nginxinc:main Jul 27, 2022
@lucacome lucacome added the enhancement New feature or request label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants