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

Use new sign tool #2167

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Use new sign tool #2167

merged 1 commit into from
Sep 25, 2024

Conversation

idg10
Copy link
Collaborator

@idg10 idg10 commented Sep 25, 2024

The old signtool has been retired. This moves over to the new sign tool.

This offers two significant security improvements:

  1. we can use a Managed Identity instead of the old client credentials flow to authenticate with Azure Key Vault
  2. the critical cryptographic step now happens inside Azure Key Vault, not on the build agent

Both of these improvements remove the need for the build agent to be in possession of a critical secret.

Because of 1, we no longer need to supply the build agent with a Client Secret. That Client Secret was critical because if it had ever been leaked, they would effectively have stolen the build agent's identity, and would have been able to ask the Key Vault to perform any operation that the our build process is allowed to do.

Because of 2, if the build process is compromised (which could happen if the project maintainers unwittingly merged a malicious PR—something that could easily happen if the malicious intent were concealed behind an apparently useful change) it is no longer possible to exfiltrate the signing key. The old signtool downloaded the private key of the code signing certificate and generated the signature itself, creating a risk that malicious code running during the build might be able to obtain that key. (We ran code signing as a separate, simple step to minimize this risk, but it was never ideal that such a critical key ended up in plain text on a build agent, even if only briefly.) Now, Azure Key Vault performs the crucial cryptographic operation at the heart of code signing, meaning that the private key now never needs to leave the Azure Key Vault. This is a significantly more secure design because it removes any possibility that the code signing private key might be retrieved, which would have enabled whoever retrieved it to generate signatures from any computer.

We need to remain vigilant of course. Azure Key Vault will still sign whatever our build process asks it to sign, so it is vitally important to make sure that the code signing build step only submits for signature the components we intend to sign.

Copy link
Collaborator

@mwadams mwadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@idg10 idg10 merged commit fefe759 into main Sep 25, 2024
12 checks passed
@idg10 idg10 deleted the feature/new-sign-tool branch September 25, 2024 09:30
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.

2 participants