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

fix: take into account all certificates located in /public-certs #243

Merged
merged 2 commits into from
Jun 19, 2023

Conversation

vitaliy-guliy
Copy link
Contributor

@vitaliy-guliy vitaliy-guliy commented Jun 15, 2023

What does this PR do?

On each container run

  • checks for /tmp/che/secret/ca.crt and for all certificates in /public-certs
  • combines all found certificates in one /tmp/node-extra-certificates/ca.crt
  • initializes NODE_EXTRA_CA_CERTS environment variable with /tmp/node-extra-certificates/ca.crt

What issues does this PR fix?

eclipse-che/che#22277

How to test this PR?

1. Use prepared sample to test the changes using che-code image, built by github action ( see comments below )

To test:

2. The second one:

  • clone the repository, checkout this branch
  • build che-code docker image by hands, upload to your quay.io account
  • fork any sample, define .che/che-editor.yaml, specify che-code image
  • create a workspace from the fork

3. I build che-code docker image locally and prepared a sample.

To test:

@github-actions
Copy link

github-actions bot commented Jun 15, 2023

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

Pull Request images published ✨
image: quay.io/che-incubator-pull-requests/che-code:pr-243-amd64
Dev image: quay.io/che-incubator-pull-requests/che-code-dev:pr-243-dev-amd64

1 similar comment
@github-actions
Copy link

Pull Request images published ✨
image: quay.io/che-incubator-pull-requests/che-code:pr-243-amd64
Dev image: quay.io/che-incubator-pull-requests/che-code-dev:pr-243-dev-amd64

@vitaliy-guliy vitaliy-guliy marked this pull request as ready for review June 15, 2023 15:14
@tolusha
Copy link

tolusha commented Jun 16, 2023

Works as expected.

Copy link
Contributor

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

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

Tested first use case + tried to add a test-certificate to the /tmp/che/secret/ca.crt to test how it's combined.
All certificates were put to the /tmp/node-extra-certificates/ca.crt
I noticed:
image
but, I guess, it's because my original test-certificate file was without empty line at the end...

@vitaliy-guliy
Copy link
Contributor Author

Tested first use case + tried to add a test-certificate to the /tmp/che/secret/ca.crt to test how it's combined. All certificates were put to the /tmp/node-extra-certificates/ca.crt I noticed: image but, I guess, it's because my original test-certificate file was without empty line at the end...

Nice catch!
The resulting certificate must always be in a proper format, I've added a fix for that case.
Thanks.

@github-actions
Copy link

Pull Request images published ✨
image: quay.io/che-incubator-pull-requests/che-code:pr-243-amd64
Dev image: quay.io/che-incubator-pull-requests/che-code-dev:pr-243-dev-amd64

Copy link
Member

@azatsarynnyy azatsarynnyy 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 @vitaliy-guliy for working on the fix 👍
It must be the final step to fix the extensions installation in a proxied environment (CRW-3942) 🎉

@azatsarynnyy azatsarynnyy merged commit f938906 into main Jun 19, 2023
6 checks passed
@azatsarynnyy azatsarynnyy deleted the use-public-certs branch June 19, 2023 12:53
azatsarynnyy pushed a commit that referenced this pull request Jun 19, 2023
* fix: take into account all certificates located in /public-certs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants