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

feat: enable trivy server with self-signed certificates #1003

Merged
merged 1 commit into from
Mar 8, 2022

Conversation

dirien
Copy link
Contributor

@dirien dirien commented Mar 4, 2022

Signed-off-by: Engin Diri engin.diri@mail.schwarz

fixes #1002

There are situations, where you have a self-signed certifacte for the Trivy Server. e.g. in our company, we have to use our own company wide PKI. Or when you use LE staging ACME. This will appear as x509 certificate signed by unknown authority

With this PR, we can set a new optional variable called trivy.insecureServer. This sets in the background the env variable TRIVY_INSECURE. It's different to existing trivy.insecureRegistry parameter. As we are not really talking about the registry.

Looking for your feedback.

@CLAassistant
Copy link

CLAassistant commented Mar 4, 2022

CLA assistant check
All committers have signed the CLA.

@dirien dirien force-pushed the self-signed-cert-support branch from 048475d to 50e0299 Compare March 4, 2022 23:51
@danielpacak danielpacak self-requested a review March 6, 2022 10:38
@codecov
Copy link

codecov bot commented Mar 6, 2022

Codecov Report

Merging #1003 (f6fb8b4) into main (f402b84) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1003      +/-   ##
==========================================
- Coverage   58.78%   58.70%   -0.09%     
==========================================
  Files          65       65              
  Lines        8493     8502       +9     
==========================================
- Hits         4993     4991       -2     
- Misses       2987     2996       +9     
- Partials      513      515       +2     
Impacted Files Coverage Δ
pkg/plugin/trivy/plugin.go 81.43% <100.00%> (+0.15%) ⬆️
pkg/operator/controller/ciskubebenchreport.go 52.58% <0.00%> (-2.40%) ⬇️
pkg/operator/controller/vulnerabilityreport.go 57.31% <0.00%> (-1.53%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f402b84...f6fb8b4. Read the comment docs.

@chen-keinan chen-keinan self-requested a review March 6, 2022 10:57
@chen-keinan
Copy link
Contributor

chen-keinan commented Mar 6, 2022

@dirien thank you for the contribution LGTM !!

Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

Thank you for working on this patch @dirien Please see my comments before we marge this PR.

deploy/helm/values.yaml Outdated Show resolved Hide resolved
deploy/helm/values.yaml Outdated Show resolved Hide resolved
Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
@dirien dirien force-pushed the self-signed-cert-support branch from a575fda to f6fb8b4 Compare March 8, 2022 09:24
@dirien
Copy link
Contributor Author

dirien commented Mar 8, 2022

Thank you for working on this patch @dirien Please see my comments before we marge this PR.

Thanks for your feedback @danielpacak! Appreciate this very much! I changed the points and will create a PR for the version bump!

Looking forward

@dirien
Copy link
Contributor Author

dirien commented Mar 8, 2022

Done for version PR bump -> #1008

Copy link
Contributor

@danielpacak danielpacak left a comment

Choose a reason for hiding this comment

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

Thank you @dirien !

@danielpacak
Copy link
Contributor

@dirien , could you sign our CLA agreement, which is one of required checks before we merge the PR?

@dirien
Copy link
Contributor Author

dirien commented Mar 8, 2022

@danielpacak, done! I clicked again on the link!

image

image

@danielpacak danielpacak merged commit dab2189 into aquasecurity:main Mar 8, 2022
@dirien dirien deleted the self-signed-cert-support branch March 8, 2022 20:05
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.

Trivy server with self signed certificate fails in starboard-operator
4 participants