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

Cert and Key SSL when Running noVNC from Snap as a Service #1763

Open
ToniCumplidoUAB opened this issue Mar 2, 2023 · 4 comments
Open

Cert and Key SSL when Running noVNC from Snap as a Service #1763

ToniCumplidoUAB opened this issue Mar 2, 2023 · 4 comments
Labels

Comments

@ToniCumplidoUAB
Copy link

Is your feature request related to a problem? Please describe.
When "Running noVNC from Snap as a Service" I can't define the cert and key values to use SSL.
Now the workaround I have found is to create a file /var/snap/novnc/current/self.pem which contains the cert and key files.

Describe the solution you'd like
Would it be possible to include in "Running noVNC from Snap as a Service" the values to define the certificate and key and Snap use them?

For example:

sudo snap get novnc services.n8443
Key Value
services.n8443.listen 8443
services.n8443.vnc ubuntu.example.com:5901
services.n8443.cert ~jsmith/snap/novnc/current/self.crt
services.n8443.key ~jsmith/snap/novnc/current/self.key

Thank you very much for the great job!

@CendioOssman
Copy link
Member

I'm afraid I'm not too familiar with how snaps work. I guess you can't specify arbitrary arguments to services?

@tkedwards?

@ToniCumplidoUAB
Copy link
Author

I'm not familiar with how snap works either. I found the file [https://github.com/novnc/noVNC/blob/master/snap/local/svc_wrapper.sh] where I think you can add the arguments, but I think you have to recreate the snap. Am I right?

@tkedwards
Copy link
Contributor

Yes you're right this could be added in the svc_wrapper.sh script. I'll see if I get time to test it out and do a pull request

@ToniCumplidoUAB
Copy link
Author

@tkedwards In my fork [https://github.com/ToniCumplidoUAB/noVNC] I have added a proposed svc_wrapper.sh, but I can't get it to access the cert and key files out of the snap. If you want you can take a look at it for inspiration. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants