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 ability to specify level of TLS verification for database connections #7636

Closed
r0mant opened this issue Jul 22, 2021 · 2 comments · Fixed by #9197
Closed

Add ability to specify level of TLS verification for database connections #7636

r0mant opened this issue Jul 22, 2021 · 2 comments · Fixed by #9197
Assignees
Labels
c-el Internal Customer Reference c-gl Internal Customer Reference c-hg Internal Customer Reference database-access Database access related issues and PRs feature-request Used for new features in Teleport, improvements to current should be #enhancements ux
Milestone

Comments

@r0mant
Copy link
Collaborator

r0mant commented Jul 22, 2021

What

Currently, Teleport database service always performs full TLS certificate verification when connecting to a target database. This is most secure but inflexible - some teams use their own certificates for their databases which do not always have proper hostname encoded, which they can't replace with Teleport-issued ones. For scenarios like this we need to add an option to lax verification of certificate presented by the database.

How

Instead of introducing binary insecure_skip_verify flag, the proposal is to make level of TLS verification more flexible to support different customer use-cases (which have come up before).

Example database configuration:

db_service:
  enabled: "yes"
  databases:
  - name: "example"
    protocol: "postgres"
    uri: "localhost:5432"
    ca_cert_file: xxx # deprecate this field and move it under "tls" section but keep for backwards compat.
    tls:
      mode: verify-full # can also be 'verify-ca' or 'insecure'
      server_name: PostgreSQL # optionally set custom server name
      ca_cert_file: /path/to/pem # optional CA path, existing field moved from the level above
  • verify-full (default) does full verification like now. Server name can be optionally overridden, otherwise the one from URI is used.
  • verify-ca skips hostname verification but checks CA.
  • insecure is analogous to Go's "insecure_skip_verify" which accepts any certificate.
@r0mant r0mant added feature-request Used for new features in Teleport, improvements to current should be #enhancements ux database-access Database access related issues and PRs c-gl Internal Customer Reference labels Jul 22, 2021
@r0mant r0mant added this to the Database Access UX milestone Jul 22, 2021
@r0mant
Copy link
Collaborator Author

r0mant commented Jul 22, 2021

@klizhentas Could you review the proposed UX please? ^

@vibechild
Copy link

I like having the two options for how insecure we want it. Either of these options will solve the issue for us, but having both available would be very nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-el Internal Customer Reference c-gl Internal Customer Reference c-hg Internal Customer Reference database-access Database access related issues and PRs 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.

4 participants