Split sagoodkey.NewKeyPolicy from goodkey.NewKeyPolicy#6651
Merged
beautifulentropy merged 2 commits intoletsencrypt:mainfrom Feb 13, 2023
Merged
Split sagoodkey.NewKeyPolicy from goodkey.NewKeyPolicy#6651beautifulentropy merged 2 commits intoletsencrypt:mainfrom
beautifulentropy merged 2 commits intoletsencrypt:mainfrom
Conversation
16 tasks
... so that goodkey no longer depends on google.golang.org/grpc and github.com/letsencrypt/boulder/sa/proto , making it cheaper to use from external Go code. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2beef96 to
0e8e289
Compare
aarongable
previously approved these changes
Feb 11, 2023
Contributor
aarongable
left a comment
There was a problem hiding this comment.
Hey, this is cool, thank you! This change seems like the cleanest way I can think of to achieve this separation. LGTM with one minor nit, and we require two approvals on all changes here so I'm requesting review from the rest of the team as well.
goodkey/good_key.go
Outdated
| return badKey("%w", err) | ||
| } | ||
| exists, err := policy.dbCheck(ctx, &sapb.KeyBlockedRequest{KeyHash: digest[:]}) | ||
| exists, err := policy.dbCheck(ctx, digest[:]) |
Contributor
There was a problem hiding this comment.
Now that BlockedKeyCheckFunc is much more generic, I'd consider renaming policy.dbCheck to policy.blockedCheck or something like that.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
aarongable
approved these changes
Feb 13, 2023
beautifulentropy
approved these changes
Feb 13, 2023
Contributor
Author
|
Thanks! |
mtrmac
added a commit
to mtrmac/image
that referenced
this pull request
Feb 13, 2023
This removes quite a bit of dependent code (295 kB on macOS). It also adds a new github.com/go-jose/go-jose.v2 , but we'll get rid of that again after letsencrypt/boulder#6581 lands. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac
added a commit
to mtrmac/image
that referenced
this pull request
Feb 14, 2023
This removes quite a bit of dependent code (295 kB on macOS). It also adds a new github.com/go-jose/go-jose.v2 , but we'll get rid of that again after letsencrypt/boulder#6581 lands. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
rhatdan
added a commit
to containers/image
that referenced
this pull request
Feb 14, 2023
Update letsencrypt/boulder after letsencrypt/boulder#6651
jonjohnsonjr
added a commit
to jonjohnsonjr/sigstore
that referenced
this pull request
May 18, 2023
This picks up letsencrypt/boulder#6651 which makes it easier to untangle our dependency on grpc and protobuf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
... so that
goodkeyno longer depends ongoogle.golang.org/grpcandgithub.com/letsencrypt/boulder/sa/proto, making it cheaper to use from external Go code.For better or worse, the
goodkeypackage is used by external callers like https://github.com/sigstore/sigstore/blob/6ba2c727c278dd46958e3446c5f8039d00a27308/pkg/cryptoutils/publickey.go#L148 ; those callers have no use for the GRPC definitions.This PR allows such callers to no longer include the
github.com/letsencrypt/boulder/core/protoandgithub.com/letsencrypt/boulder/sa/protosubpackages, allowing to shave 295 kB from the binary size.Existing tests were used unchanged in the new
sagoodkeypackage, and adapted directly ingoodkey.