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

Add support for ACME #5177

Closed
klizhentas opened this issue Dec 20, 2020 · 4 comments · Fixed by #5178
Closed

Add support for ACME #5177

klizhentas opened this issue Dec 20, 2020 · 4 comments · Fixed by #5178
Assignees
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements ux

Comments

@klizhentas
Copy link
Contributor

klizhentas commented Dec 20, 2020

Feature Request

I've been running a quickstart guide and it was quite tedious to get to a running teleport server.
One of the obstacles running it in any environment is getting certs provisioned.

Add support for ACME mode for proxy service. It does not have to be scalable on the first release.

@klizhentas klizhentas self-assigned this Dec 20, 2020
@klizhentas klizhentas added this to the 6.0 "San Diego" milestone Dec 20, 2020
@klizhentas klizhentas added ux feature-request Used for new features in Teleport, improvements to current should be #enhancements labels Dec 20, 2020
klizhentas added a commit that referenced this issue Dec 20, 2020
This commit fixes #5177

Initial implementation uses dir backend as a cache and is OK
for small clusters, but will be a problem for many proxies.

This implementation uses Go autocert that is quite limited
compared to Caddy's certmagic or lego.

Autocert has no OCSP stapling and no locking for cache for example.
However, it is much simpler and has no dependencies.
It will be easier to extend to use Teleport backend as a cert cache.

```yaml
proxy_service:
  public_addr: ['example.com']
  # ACME - automatic certificate management environment.
  #
  # It provisions certificates for domains and
  # valid subdomains in public_addr section.
  #
  # The sudomains are valid if there is a registered application.
  # For example, app.example.com will get a cert if app is a regsitered
  # application access app. The sudomain cookie.example.com is not.
  #
  # Teleport acme is using TLS-ALPN-01 challenge:
  #
  # https://letsencrypt.org/docs/challenge-types/#tls-alpn-01
  #
  acme:
    # By default acme is disabled.
    enabled: true
    # Use a custom URI, for example staging is
    #
    # https://acme-staging-v02.api.letsencrypt.org/directory
    #
    # Default is letsencrypt.org production URL:
    #
    # https://acme-v02.api.letsencrypt.org/directory
    uri: ''
    # Set email to receive alerts and other correspondence
    # from your certificate authority.
    email: 'alice@example.com'
```
@benarent
Copy link
Contributor

+1 for this issue. I've found that newer versions of Chrome are getting fussier about self-signed certs and the setup for certbot is as many steps as Teleport itself. This makes the community setup process smoother. I would suggest we add it to the output for teleport configure.

For Enterprise users, do we envision supporting ACM / GCPs Cert manager or will we offload this to other scripting / setup tools / terraform etc.

@benarent
Copy link
Contributor

Another thought on this issue. It'll be good to obtain a wild card certificate for the subdomain to support Applications. e.g. "teleport.example.com, *.teleport.example.com"

klizhentas added a commit that referenced this issue Dec 23, 2020
This commit fixes #5177

Initial implementation uses dir backend as a cache and is OK
for small clusters, but will be a problem for many proxies.

This implementation uses Go autocert that is quite limited
compared to Caddy's certmagic or lego.

Autocert has no OCSP stapling and no locking for cache for example.
However, it is much simpler and has no dependencies.
It will be easier to extend to use Teleport backend as a cert cache.

```yaml
proxy_service:
  public_addr: ['example.com']
  # ACME - automatic certificate management environment.
  #
  # It provisions certificates for domains and
  # valid subdomains in public_addr section.
  #
  # The sudomains are valid if there is a registered application.
  # For example, app.example.com will get a cert if app is a regsitered
  # application access app. The sudomain cookie.example.com is not.
  #
  # Teleport acme is using TLS-ALPN-01 challenge:
  #
  # https://letsencrypt.org/docs/challenge-types/#tls-alpn-01
  #
  acme:
    # By default acme is disabled.
    enabled: true
    # Use a custom URI, for example staging is
    #
    # https://acme-staging-v02.api.letsencrypt.org/directory
    #
    # Default is letsencrypt.org production URL:
    #
    # https://acme-v02.api.letsencrypt.org/directory
    uri: ''
    # Set email to receive alerts and other correspondence
    # from your certificate authority.
    email: 'alice@example.com'
```
@awly
Copy link
Contributor

awly commented Jan 4, 2021

Great improvement!
@benarent @klizhentas this feature is not described in public docs yet.
Also, does this work behind a load balancer?

@klizhentas
Copy link
Contributor Author

@awly it uses TLS-ALPN-01 challenge, so it will work behind non-terminating load balancer. It will get into 6.0 so it's not in the docs for 5.0 yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Used for new features in Teleport, improvements to current should be #enhancements ux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants