-
Notifications
You must be signed in to change notification settings - Fork 157
ROX-29160: Add built-in signature integration for Red Hat signature #15761
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
base: ROX-17872-Remove-remaining-reference-to-feature-flag
Are you sure you want to change the base?
ROX-29160: Add built-in signature integration for Red Hat signature #15761
Conversation
Skipping CI for Draft Pull Request. |
be4a6ad
to
23c13a6
Compare
Images are ready for the commit at e87a45d. To use with deploy scripts, first |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ROX-17872-Remove-remaining-reference-to-feature-flag #15761 +/- ##
=====================================================================================
Coverage 48.81% 48.81%
=====================================================================================
Files 2590 2590
Lines 190591 190629 +38
=====================================================================================
+ Hits 93029 93059 +30
- Misses 90252 90258 +6
- Partials 7310 7312 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c2988af
to
306bfc7
Compare
This change is part of the following stack: Change managed by git-spice. |
e4e0ad1
to
77ffe76
Compare
77ffe76
to
9ef9557
Compare
afc4353
to
2a3f10b
Compare
9ef9557
to
b077dd9
Compare
2a3f10b
to
adab0fb
Compare
b077dd9
to
7b8fa74
Compare
Not a blocker, but one side effect of a default signature integration that I want to call out: Central currently has an optimization to skip image signature downloads if no signature integration has been added. If we add now a signature by default, this optimization will no longer work as is, and signatures will always be loaded. In the past some users have reported this as an issue because their image registries are self-hosted and are sensitive to additional load. Some ideas come to my mind to address this issue:
As a side note, this optimization only works in Central - when using delegated scanning, image signature are already always fetched. |
d7c4ff2
to
e394187
Compare
7b8fa74
to
6e209ef
Compare
Thanks! I could have introduced a performance penalty for some customers without knowing. I'm not a big fan of adding tangling between different areas of the product, special cases etc, which is what reworking the optimization implies. On the other I can imagine that customers who rely on the optimization would not be happy to see that it's been removed and now they need to use feature flags to prevent their registries from getting overloaded. So the tangling sounds better than this. Are there any other alternatives here? How about reworking the optimization to only fetch signatures of images hosted at registries for which a signature integration exists? Does that sound too difficult/cumbersome? |
The problem is that signature integrations do not depend on the registry. For example, I may create a signature integration for my public key - but I can use this public key to sign images of any registry. The only exception - more or less - are the Red Hat registries, where we know that all images are supposed to be signed by the golden key, and nobody else have write permissions to create any other signatures. So we could say something like "if only the Red Hat signature integration exists, then only download signatures for Red Hat images". |
Yeah right, I was mixing up signatures and policies, I meant "only fetch sigs of images hosted at registries for which a signature-verifying policy exists". I imagine that this is probably a no-go, because we use the signature integration to verify signatures and at least display that info in the UI even if there's no policy involving signatures. I will give a shot at your proposal, which seems to me like our best bet: "if only the Red Hat signature integration exists, then only download signatures for Red Hat images |
6e209ef
to
f271347
Compare
a16cd1a
to
c61921b
Compare
cdc9ee6
to
d2dbde2
Compare
Just for getting something that works in place
Based on registry and remote heuristics. This will be used in upcoming changes to keep the optimization at [1] working even when a signature is present by default: If only 1 signature integration exists, and that is the built-in red hat signature integration, and the image is a red hat image, download the signature. Otherwise skip. [1] https://github.com/stackrox/stackrox/blob/e3180cf49b7e79c31640af08ea571edfc7ffdd28/pkg/images/enricher/enricher_impl.go#L712
d2dbde2
to
e881962
Compare
This optimization skips signature download when no signature integrations are present. Adding a built-in integration would effectively disable the optimization, and we want to avoid that. This commit reworks the optimziation so that when only the built in signature integration is present only signatures for Red Hat images are downloaded - the rest will still be skipped.
Description
change me!
User-facing documentation
Testing and quality
Automated testing
How I validated my change
change me!