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

Update: Pinning Cheat Sheet #1428

Open
MarkSRobinson opened this issue Jun 16, 2024 · 7 comments
Open

Update: Pinning Cheat Sheet #1428

MarkSRobinson opened this issue Jun 16, 2024 · 7 comments
Labels
ACK_OBTAINED Issue acknowledged from core team so work can be done to fix it. UPDATE_CS Issue about the update/refactoring of a existing cheat sheet.

Comments

@MarkSRobinson
Copy link

What is missing or needs to be updated?

The current cheat sheet recommends certificate pinning. This is actually really bad from an operational sense because certificates have to be rotated out frequently. Currently all publicly signed leaf certificates have a maximum life of 397 days, and there is a proposal to drop this down to 90 days.

Most crypto systems change out the key on each renewal. Google is proposing to require all root certs to use new key data when refreshed. Keys also require replacement as recommend sizes gradually increases, and if there is a potential security breach all keys should be proactively rotated even if the key material has not been compromised.

Digicert recommends against certificate pinning.

Key pinning has generally caused problems than it solves as the inevitable key changes causes widespread breakages.

How should this be resolved?

Certificate pinning should be generally discouraged in the common case. If using the public root CAs does not provide enough security, people should use private CAs and have those root CAs distributed as needed.

@MarkSRobinson MarkSRobinson added ACK_WAITING Issue waiting acknowledgement from core team before to start the work to fix it. HELP_WANTED Issue for which help is wanted to do the job. UPDATE_CS Issue about the update/refactoring of a existing cheat sheet. labels Jun 16, 2024
@szh
Copy link
Collaborator

szh commented Jun 16, 2024

I agree that pinning should not be recommended for the majority of web applications. I think there's a place for it in specific instances where a high level of security is needed, but only when there is control of the client and server, so rotations can be properly handled on both ends (such as with client-server software where both are managed by an enterprise).

@jmanico
Copy link
Member

jmanico commented Jun 16, 2024 via email

@kwwall
Copy link
Collaborator

kwwall commented Jun 16, 2024

Just so you know, @markgamache and myself have been working on a PR for this which is an extensive rewrite and should address this. Mark has been in touch with both of the original authors (Jeffrey Walton and myself) and we've been working on this on and off since maybe end 3Q2023.

@jmanico
Copy link
Member

jmanico commented Jun 17, 2024

I'm happy to hear this. Thank you @kwwall :)

@szh szh added ACK_OBTAINED Issue acknowledged from core team so work can be done to fix it. and removed ACK_WAITING Issue waiting acknowledgement from core team before to start the work to fix it. HELP_WANTED Issue for which help is wanted to do the job. labels Jun 17, 2024
@markgamache
Copy link
Contributor

@MarkSRobinson FIWIW, I am slow, but am working in two halves of this. There is not only the cheat sheet, but a large doc on the threat model, rationale, and a bit of history that made pinning make sense in the past. I created Updates to Certificate_and_Public_Key_Pinning.md #786 to first update the threat model and yes, suggest that pinning creates a lot of risk and little reward. Expect that PR in a day or two. I also have an issue open for the cheat sheet. The intent is to first get the changes approved for the main document, and then do a PR that leads off with, read the threat model and probably don't pin. It will still have continent on how to do it if you must.

The main bits are PKI is much more secure now, due to the CABF, CT logs, CAA records, etc. Pinning was only ever meant for mobile, where one party controls the client and server. It also talks about how you would automate pin rotation if you really feel you must. The old guidance seemed to almost mandate pinning in the eyes of the reader and GRC types. The new should be, don't pin unless you reallllllly have to.

@MarkSRobinson
Copy link
Author

@markgamache I would love to see it. I strongly support either marking it as legacy or severely revamping the doc emphasize the threat model.

@markgamache
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACK_OBTAINED Issue acknowledged from core team so work can be done to fix it. UPDATE_CS Issue about the update/refactoring of a existing cheat sheet.
Projects
None yet
Development

No branches or pull requests

5 participants