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

Set InsecureSkipVerify flag as the Insecure one #218

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

dlion
Copy link
Member

@dlion dlion commented Aug 29, 2023

This PR concerns the insecure-registry RFC implementation in the imgutil library.

In the previous PR, a functionWithRegistrySetting has been implemented with the possibility to activate or deactivate the InsecureSkipVerify flag.

The RFC wasn't very clear about the reason it needed to be permanently set as false/true so I tried to investigate a bit how other tools/libraries implemented it.
From Google:

// Insecure is an Option that allows image references to be fetched without TLS.
// This will also allow for untrusted (e.g. self-signed) certificates in cases where
// the default transport is used (i.e. when WithTransport is not used).

This implementation followed the one made by Google: https://github.com/google/go-containerregistry/blob/main/pkg/crane/options.go#L70 and https://github.com/google/go-containerregistry/blob/190ad0e4d556f199a07951d55124f8a394ebccd9/cmd/crane/cmd/root.go#L83

With this PR, whenever we set a registry as Insecure we also disable the TLS verification.

@dlion dlion requested a review from a team as a code owner August 29, 2023 16:01
Copy link
Member

@natalieparellano natalieparellano left a comment

Choose a reason for hiding this comment

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

Love it, thanks for taking the time to research how other tools are handling this @dlion!

@jabrown85 did you want to have a look also?

@natalieparellano natalieparellano merged commit 6a790d1 into buildpacks:main Sep 8, 2023
@dlion dlion deleted the default-insecureskipverify branch September 13, 2023 13:01
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