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

Make url and port viewer configurable #1271

Merged
merged 1 commit into from
Apr 4, 2019
Merged

Make url and port viewer configurable #1271

merged 1 commit into from
Apr 4, 2019

Conversation

jlelong
Copy link
Collaborator

@jlelong jlelong commented Apr 3, 2019

Use the following configuration variables

latex-workshop.viewer.pdf.internal.url
latex-workshop.viewer.pdf.internal.port

This is related to #1265.

@tamuratak
Copy link
Contributor

From the viewpoint of security, I am against making host configurable, which would unintentionally allow remote access to local pdf and other files. That would require us to implement access control of the server. I want to avoid that.

We should force users to use a reverse proxy with access control, e.g., ssh port forwarding.

I think making port configurable is not a problem.

@imxieyi
Copy link

imxieyi commented Apr 4, 2019

From the viewpoint of security, I am against making host configurable, which would unintentionally allow remote access to local pdf and other files.

I agree. Actually I am using HTTP basic authentication for the whole code-server. A warning could be added to warn user about potential risks.

I think only advanced users who are aware of this risk as well as how to prevent it will bother modifying this configuration. So this is not a severe issue.

@jlelong
Copy link
Collaborator Author

jlelong commented Apr 4, 2019

Would it be sufficient to have port configurable?

@imxieyi
Copy link

imxieyi commented Apr 4, 2019

No. Even if I use nginx to reverse proxy it, it is still not possible to launch viewer from ide since the url is still localhost.

@tamuratak
Copy link
Contributor

I am strongly against making host configurable. Users often copy and paste their settings from blog entries and stackoverflow without thinking about security risks. Assuming "only advanced users" is too optimistic.

Using nginx is not an appropriate solution. Please use ssh port forwarding. Then, it would be sufficient to have port configurable.

@imxieyi
Copy link

imxieyi commented Apr 4, 2019

Is it possible to add cookies check or some authentication to the preview server? I think this can be enabled with a custom url.

@jlelong
Copy link
Collaborator Author

jlelong commented Apr 4, 2019

The discussion seems to have gone beyond the original scope of the PR. For now, it will only merge the port configuration feature and will leave any further improvements on supporting vscode-server to the community. PRs are welcome.

We do not make url configurable because of security issues.
@fockez
Copy link

fockez commented Jul 22, 2020

I want to provide code-server in jupyter docker with jupyterhub, so the PDF viewer still needed.

Repository owner locked as resolved and limited conversation to collaborators Jul 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants