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

Allow admin user to further limit TLS ciphers used for TLS1.2 client requests and server ports (not including CLI) #1952

Merged
merged 7 commits into from
Jun 14, 2024

Conversation

joshuatcasey
Copy link
Member

Limit TLS ciphers for tls1.2.

Fixes #1605.

Replaces #1927.

Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 88.82682% with 20 lines in your changes missing coverage. Please review.

Project coverage is 30.68%. Comparing base (5d6dbe1) to head (f7f32f2).

Files Patch % Lines
internal/crypto/ptls/common.go 94.61% 4 Missing and 3 partials ⚠️
test/testlib/securetls.go 0.00% 7 Missing ⚠️
internal/concierge/server/server.go 0.00% 3 Missing ⚠️
internal/supervisor/server/server.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1952      +/-   ##
==========================================
+ Coverage   30.59%   30.68%   +0.09%     
==========================================
  Files         363      365       +2     
  Lines       60516    60617     +101     
==========================================
+ Hits        18513    18602      +89     
- Misses      41469    41479      +10     
- Partials      534      536       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joshuatcasey joshuatcasey force-pushed the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch 5 times, most recently from 8edfa60 to afd742e Compare May 15, 2024 17:02
@cfryanr
Copy link
Member

cfryanr commented May 15, 2024

Does this new configuration option allow the user to constrain the ciphers so much that everything stops working? For example, if they only allow one cipher, and that cipher is not an elliptic curve cipher, then will that break everything (because all of our auto-generated TLS certs use EC)?

@joshuatcasey
Copy link
Member Author

Does this new configuration option allow the user to constrain the ciphers so much that everything stops working? For example, if they only allow one cipher, and that cipher is not an elliptic curve cipher, then will that break everything (because all of our auto-generated TLS certs use EC)?

This is a good point. Something outside of the Pinniped code ultimately decides which ciphers to use that even further constrain the user-allowed list. At the moment this would not impede application startup but the endpoints would never complete a TLS handshake. This needs more thought.

@joshuatcasey
Copy link
Member Author

What if we reserved at least one elliptic cipher for Pinniped use? That way at least the healthcheck would work. If the user has provided incompatible certificates and cipher suites there's not much we can do about that.

Another option is we require at least one elliptic and one RSA cipher?

@joshuatcasey joshuatcasey changed the title Limit TLS ciphers for tls1.2 v2 Limit TLS ciphers for tls1.2 May 23, 2024
@joshuatcasey joshuatcasey force-pushed the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch 3 times, most recently from 1dc7b20 to 3fde006 Compare May 24, 2024 15:21
@cfryanr cfryanr force-pushed the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch from 3fde006 to 936dd20 Compare June 3, 2024 20:16
@joshuatcasey joshuatcasey force-pushed the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch 3 times, most recently from a94a614 to 91b39cb Compare June 11, 2024 13:57
@joshuatcasey joshuatcasey marked this pull request as ready for review June 11, 2024 14:02
@joshuatcasey joshuatcasey force-pushed the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch from 91b39cb to bd1650b Compare June 12, 2024 02:40
@cfryanr
Copy link
Member

cfryanr commented Jun 12, 2024

What if we reserved at least one elliptic cipher for Pinniped use? That way at least the healthcheck would work. If the user > has provided incompatible certificates and cipher suites there's not much we can do about that.

Another option is we require at least one elliptic and one RSA cipher?

We discussed on a call and I think we decided that the documentation for the new option is sufficient. We cannot know what combination of cipher will work because it is outside our control, for example we don't know how the Kubernetes API server's ciphers were configured.

cfryanr and others added 2 commits June 14, 2024 10:42
@cfryanr cfryanr force-pushed the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch from bd1650b to be8d3f2 Compare June 14, 2024 17:42
@cfryanr cfryanr changed the title Limit TLS ciphers for tls1.2 Allow admin user to further limit TLS ciphers used for TLS1.2 client requests and server ports (not including CLI) Jun 14, 2024
@cfryanr cfryanr force-pushed the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch from be8d3f2 to e1b0526 Compare June 14, 2024 18:55
@cfryanr cfryanr enabled auto-merge June 14, 2024 19:02
@cfryanr cfryanr force-pushed the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch from e1b0526 to f7f32f2 Compare June 14, 2024 20:27
@cfryanr cfryanr merged commit 238df12 into main Jun 14, 2024
43 checks passed
@cfryanr cfryanr deleted the jtc/issue-1605-limit-tls-ciphers-for-tls1.2-v2 branch June 14, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to configure the cipher suite used for TLS
3 participants