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

[Suggestion] Support selfsigned certificate when lifecycle is launched as a pod #1077

Open
cmoulliard opened this issue May 2, 2023 · 3 comments
Labels
status/ready type/enhancement New feature or request

Comments

@cmoulliard
Copy link

cmoulliard commented May 2, 2023

Description

When the lifecycle is launched as a pod, the following error is reported during the ANALYZING phase as the go-containerregistry tries to access a secured docker registry which is not running within the kubernetes cluster and where the certificate has been signed by an unknow authority

...
4 of 11 buildpacks participating
paketo-buildpacks/ca-certificates 3.6.1
paketo-buildpacks/node-engine     1.5.0
paketo-buildpacks/npm-install     1.1.0
paketo-buildpacks/node-start      1.0.7
===> ANALYZING
Warning: Platform requested deprecated API '0.4'
ERROR: failed to initialize analyzer: getting previous image: connect to repo store "kind-registry.local:5000/snowdrop/sample-nodejs:latest": Get "https://kind-registr
y.local:5000/v2/": x509: certificate signed by unknown authority; Get "http://kind-registry.local:5000/v2/": net/http: HTTP/1.x transport connection broken: malformed
HTTP response "\x15\x03\x01\x00\x02\x02"

Proposed solution

Lifecycle should expose additional variables able to configure how it will communicate as client with the container registry:

SECURE_REGISTRY: true/false
REGISTRY_USERNAME: key mounted from a secret
REGISTRY_PASSOWRD: key mounted from a secret
REGISTRY_CA_CERTIFICATE: path to access the certificate mounted as volume

Additional context

go-container and x.509 unknow certificate authority issue: https://github.com/google/go-containerregistry/issues?q=is%3Aissue+x509%3A+certificate+signed+by+unknown+authority

@cmoulliard cmoulliard added status/triage type/enhancement New feature or request labels May 2, 2023
@cmoulliard cmoulliard changed the title [Suggestion] Support selfsigned certificate when lifecycle is started as$$ [Suggestion] Support selfsigned certificate when lifecycle is launched as a pod May 2, 2023
@cmoulliard
Copy link
Author

Temporary workaround is to set as ENV VAR SSL_CERT_DIR - redhat-buildpacks/testing@87c186f#diff-a37dde4de2485edb113484a3c30e42bf483b3dd03c055c6b12e3e52e63366de3L57

@natalieparellano
Copy link
Member

Not exactly the same but related: #524

@yodatak
Copy link

yodatak commented Jun 5, 2023

We go the same problem at work with enterprise signed certificates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants