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

Support multiple TLS certificates via SNI #153

Closed
plombardi89 opened this issue Nov 16, 2017 · 10 comments
Closed

Support multiple TLS certificates via SNI #153

plombardi89 opened this issue Nov 16, 2017 · 10 comments
Assignees
Milestone

Comments

@plombardi89
Copy link
Contributor

Ambassador supports a single TLS certificate but I need to support multiple TLS certificates where we use different domains for different types of services.

*.kubernaut.io is for Kubernaut

scout.datawire.io is needed for another service.

We have other services coming down the pipeline that will also need to be able to be under a different domain and therefore require another TLS wildcard certificate.

@plombardi89
Copy link
Contributor Author

Decided to do a little Googling... this might be a necessary prerequisite envoyproxy/envoy#95

@pgold30
Copy link

pgold30 commented Apr 4, 2018

Hi @plombardi89 , i see that the ticket you mention has been closed on Dec 2017 , and envoy support tls: added SNI support. from version 1.5 ( https://www.envoyproxy.io/docs/envoy/latest/intro/version_history#id1 ) Is there and estimated for this, or is even in the roadmap? we really need this feature to work with several certificates.

@kflynn
Copy link
Member

kflynn commented May 29, 2018

This issue pretty much requires #463.

@adrianchifor
Copy link

Is anyone working on this? If not I can take a look; need this feature before we can take ambassador into prod.

@kflynn
Copy link
Member

kflynn commented Jul 20, 2018

@adrianchifor #463 will be in Ambassador 0.36.0, which is coming up. If you want to take a look at SNI in Envoy, that would be wonderful. 😄 Are you in the Ambassador Slack already? https://d6e.co/slack

@plombardi89 plombardi89 changed the title Support multiple TLS certificates Support multiple TLS certificates via SNI Jul 30, 2018
@concaf concaf removed their assignment Aug 2, 2018
@jazoom
Copy link

jazoom commented Aug 24, 2018

Is there any way to work around this for the time being? I didn't realise Ambassador couldn't handle more than one TLS certificate/domain. And as others have said, this is required for using it in production.

@richarddli
Copy link
Contributor

SNI is a high priority item (we're doing a bunch of internal work on a branch which is a precursor to SNI, among other things). In the meantime, you can run multiple ambassadors (see https://www.getambassador.io/reference/running#multiple-ambassadors-in-one-cluster) and give each ambassador a unique secret.

@jazoom
Copy link

jazoom commented Aug 25, 2018

I thought of something like that but didn't realise you had the ID system built in. I didn't go with this method because then I'd need an SNI reverse proxy to route to the correct Ambassador anyway, so I may as well just stick a TLS-terminating Nginx in front as a sidecar to handle port 443.

Or is the SNI reverse proxy not required if using the Ambassador ID? If traffic destined for https://example.com (ID 1) hits Ambassador with ID 2 (which has the cert for https://notexample.com), will it forward the traffic onto Ambassador with ID 1 to terminate the TLS appropriately?

@concaf
Copy link
Contributor

concaf commented Oct 18, 2018

Talking about the syntax to configure SNI via ambassador, we can let the end users to configure it using secrets or files, pretty similar to how they configure in the TLS module; just that they'd do it in mappings now.

This needs to be per mapping because the certs will tie themselves with the given envoy filter which is configured in a mapping.

  • Secret -
      ---
      apiVersion: ambassador/v0
      kind:  Mapping
      name:  httpbin-mapping
      prefix: /httpbin/
      service: httpbin
      tls:
        servers:
        - example.com
        - www.example.com
        secret: httpbin-secret
  • Filenames -
      ---
      apiVersion: ambassador/v0
      kind:  Mapping
      name:  httpbin-mapping
      prefix: /httpbin/
      service: httpbin
      tls:
        servers:
        - example.com
        - www.example.com
        cert_chain_file: /etc/certs/tls.crt
        private_key_file: /etc/certs/tls.key

Thoughts? @rhs @kflynn

References:

@kflynn kflynn added this to the 0.50.0-ea5 milestone Nov 1, 2018
@kflynn
Copy link
Member

kflynn commented Nov 7, 2018

Done in EA5. Further Kat work tracking in #814.

@kflynn kflynn closed this as completed Nov 7, 2018
iNoahNothing pushed a commit that referenced this issue Dec 18, 2019
acookin pushed a commit that referenced this issue Mar 10, 2021
Update for Ambassador 1.10.0
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

No branches or pull requests

7 participants