-
Notifications
You must be signed in to change notification settings - Fork 47
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
Move TLS authentication material to registry credentials object #195
Merged
Conversation
This file contains 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
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Benchmark Test ResultsBenchmark results from the latest changes vs base branch
|
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
…ic sources Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
kzantow
approved these changes
Aug 29, 2023
wagoodman
added a commit
to 5p2O5pe25ouT/syft
that referenced
this pull request
Aug 29, 2023
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This was referenced Aug 29, 2023
wagoodman
added a commit
to 5p2O5pe25ouT/grype
that referenced
this pull request
Aug 29, 2023
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
wagoodman
added a commit
to anchore/syft
that referenced
this pull request
Aug 29, 2023
* add registry certificate verification support * replace stereoscope version * modify go.mod * pull in stereoscope update Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * rename registry cert options, add docs, and add test Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * update to account for changes in anchore/stereoscope#195 Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix cli tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: lishituo <24578666@qq.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
wagoodman
added a commit
to anchore/grype
that referenced
this pull request
Aug 29, 2023
* add registry certificate verification support * modify go.mod * rename registry cert options, add docs, and add test Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * update to account for changes in anchore/stereoscope#195 Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix cli tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: lishituo <24578666@qq.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
GijsCalis
pushed a commit
to GijsCalis/syft
that referenced
this pull request
Feb 19, 2024
* add registry certificate verification support * replace stereoscope version * modify go.mod * pull in stereoscope update Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * rename registry cert options, add docs, and add test Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * update to account for changes in anchore/stereoscope#195 Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix cli tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: lishituo <24578666@qq.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
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.
#169 added support for providing client certificate and key for MTLS authentication with a registry as well as the ability to validate cert chains with a self-signed cert. This augments that PR by moving this client cert configuration to a per-registry configuration while expanding the ca cert configuration on registry options.
Though the
CAFile
on the go tlsconfig options does not replace the root cert pool with the single user-provided cert, having a singular field for this (instead of per-registry) prevents the ability to provide multiple CA certs for use with multiple registries that may have certs from unrelated CAs. The larger issue is thatClientCert
would be presented to any registry, even though it should only apply to a single registry.The specific changes made are:
CAFile
option to allow for either a single cert file or directory of*.crt
,*.cert
,*.pem
files (new item isCAFileOrDir
).ClientCert
andClientKey
to theRegistryCredentials
object.RegistryOptions.TLSOptions
to handle crafting TLS options for MTLS.