Skip to content

Support GCP KMS for checkpoint signer #36

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

Closed
wants to merge 3 commits into from

Conversation

roger2hk
Copy link
Contributor

@roger2hk roger2hk commented Nov 3, 2024

#6

This pull request adds the GCP KMS signer for signing checkpoints and SCTs. The terraform configs are included. Note that it is impossible to immediately remove the keyring and corresponding keys once they're created.

This implementation uses remote signing on GCP KMS. The KMS signing QPS is high enough (60,000) that it is very hard to hit the limit. There is some cost incurred for each signing operation.

@roger2hk roger2hk force-pushed the gcp-kms branch 7 times, most recently from 35512b0 to 361891d Compare November 4, 2024 17:25
@roger2hk roger2hk marked this pull request as ready for review November 4, 2024 18:05
@roger2hk roger2hk requested review from phbnf and AlCutter November 4, 2024 18:06
@phbnf
Copy link
Collaborator

phbnf commented Nov 5, 2024

This signer will also be used to sign SCTs. CT issuing rate right now is about 100 certs/s. I read that the cost of remote signing is 0.03 per 10,000 operations. That means that over a year, signing SCTs would cost 100*60*60*24*365*0.03/10000 ~=10k USD. I think it's a bit high, so we need a different strategy for CT. Is there another PR coming after this one and building on it to lower costs?

(without SCT signing, and an integration i.e a checkpoint every second, that's ~100USD a year, which looks okay to me. To put things into perspective, that's ~16% of the smallest GCP spanner footprint one can buy)

@roger2hk
Copy link
Contributor Author

roger2hk commented Nov 5, 2024

On top of KMS, I plan to implement the Secret Manager. This enables the CT server to fetch the key during initialization, so the signing operations can rely on the signing key in memory.

@phbnf
Copy link
Collaborator

phbnf commented Nov 5, 2024

Given that the Alpha goal is to use this for CT, let's prioritise the Secret Manager implementation first? I also wouldn't want load tests (and later, integration pipelines) to use KMS because that would incur further costs, (and potentially latency).

My vision for gcp/main.go is for it to be the main file that a CT log operator would use on GCP.

I understand after speaking with you that there might be some other use cases (like Sigstore) that might want to use KMS for signing operations, but we can probably delay this for after Alpha? Given that you've already written the code for KMS, maybe we could park it in a different branch and/or submit the code later, but not use it in gcp/main.go and the load test commands? When Sigstore experiments with CT, they can have their own main.go file that imports this library, and uses KMS. They would maybe even be interested in owning this library if they use KMS, but we don't for CT logs we run.

@roger2hk
Copy link
Contributor Author

roger2hk commented Nov 5, 2024

Closing this pull request as the KMS signing cost is quite expensive for the CT ecosystem when compared with in-memory signing. If any CT log operator is interested to use KMS signing, I will come back to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants