Skip to content

[WIP] fix: use internal plugin registry for the embedded openVSX registry - #96

Closed
svor wants to merge 3 commits into
mainfrom
sv-internal-plugin-registry
Closed

svor wants to merge 3 commits into
mainfrom
sv-internal-plugin-registry

Conversation

@svor

@svor svor commented Aug 26, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: Valerii Svydenko [email protected]

Use the internal plugin registry URL for the embedded openVSX registry to avoid problems with the certificates

Related problem: eclipse-che/che#21662

@benoitf

benoitf commented Aug 26, 2022

Copy link
Copy Markdown
Contributor

AFAIK it won't work as we're accessing the registry both from the client side and the server side

Comment thread build/scripts/entrypoint-volume.sh Outdated
if [ -z "$OPENVSX_REGISTRY_URL" ]; then
# remove the suffix /v3 from this variable
CHE_PLUGIN_REGISTRY_ROOT_URL=${CHE_PLUGIN_REGISTRY_URL%/v3}
CHE_PLUGIN_REGISTRY_ROOT_URL=${CHE_PLUGIN_REGISTRY_INTERNAL_URL%/v3}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

probably here we need two variables, one with external access, one internal

internal should go in the product.json
external in the .js file (used by browser so it needs to reach access)

@github-actions

Copy link
Copy Markdown
Contributor

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

@benoitf benoitf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM but I have not yet tested

Comment thread build/scripts/entrypoint-volume.sh Resolved
@github-actions

Copy link
Copy Markdown
Contributor

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

@svor svor changed the title fix: use internal plugin registry for the embedded openVSX registry [WIP] fix: use internal plugin registry for the embedded openVSX registry Aug 26, 2022
@svor

svor commented Aug 26, 2022

Copy link
Copy Markdown
Contributor Author

I haven't checked that either, marked as WIP

@github-actions

Copy link
Copy Markdown
Contributor

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

@svor

svor commented Aug 26, 2022

Copy link
Copy Markdown
Contributor Author

using OPENVSX_INTERNAL_URL=http://plugin-registry.eclipse-che.svc:8080/openvsx/vscode
using OPENVSX_EXTERNAL_URL=https://eclipse-che.apps.ci-ln-9lzvddk-72292.origin-ci-int-gce.dev.rhcloud.com/plugin-registry/openvsx/vscode

still doesn't work

[19:44:59] Failed to install extension. redhat.java
[19:44:59] Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:520:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
}

@benoitf

benoitf commented Aug 26, 2022 •

Copy link
Copy Markdown
Contributor

There is rewrite of links with ha_proxy sending original Host in headers so I think even if you access internal links to openvsx, it's providing in JSON answer the public links

@benoitf

benoitf commented Aug 26, 2022

Copy link
Copy Markdown
Contributor

For example if you try to see https:///plugin-registry/openvsx/api/redhat links

@svor

svor commented Sep 1, 2022

Copy link
Copy Markdown
Contributor Author

superseded by #98

@svor svor closed this Sep 1, 2022
@azatsarynnyy
azatsarynnyy deleted the sv-internal-plugin-registry branch September 5, 2022 17:26
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.

2 participants