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

Configure jib.allowInsecureRegistries as required #2674

Merged
merged 4 commits into from
Aug 26, 2019

Conversation

briandealwis
Copy link
Member

@briandealwis briandealwis commented Aug 16, 2019

Exposes docker.isInsecuredocker.IsInsecure and adds some tests (wasn't actually testing the value from insecureRegistries).

Fixes #2664

@chanseokoh
Copy link
Member

Even with -Djib.allowInsecureRegistries=true, Jib will not send credentials if HTTP (insecure HTTPS will work), unless setting -DsendCredentialsOverHttp=true. Should we set it too?

@briandealwis
Copy link
Member Author

briandealwis commented Aug 20, 2019

I've been thinking this over and I don't think we should unless we change allowInsecureRegistries to specify a set of registries rather than a blanket true/false. I might be ok for my password to be sent in the clear to my.corp.registry.local, but not to registry-1.docker.io.

@chanseokoh
Copy link
Member

I think it's OK to not set -DsendCredentialsOverHttp=true. No need at least for now.

BTW, registry-1.docker.io is a secure registry, so I guess allowInsecureRegistries has no effect on it?

@briandealwis
Copy link
Member Author

I only meant registry-1.docker.io as an hypothetical example — like a corporate firewall that prevented HTTPS connections to *.docker.io but inadvertently allowed HTTP connections. If we included sendCredentialsOverHttp then Jib would cascade and send the password in the clear.

@chanseokoh
Copy link
Member

That's a fair point. So, I guess this PR is good and final as it stands now?

@briandealwis
Copy link
Member Author

I think it's good to go.

@nkubala
Copy link
Contributor

nkubala commented Aug 26, 2019

LGTM, but looks like some of the unit tests need to be updated?

@briandealwis
Copy link
Member Author

Oh jeepers, I can't believe I inverted the test condition 😊

@nkubala nkubala merged commit 19fbddf into GoogleContainerTools:master Aug 26, 2019
@briandealwis briandealwis deleted the insecure branch August 30, 2019 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skaffold-Jib should propagate insecure-registries setting to Jib
4 participants