-
Notifications
You must be signed in to change notification settings - Fork 900
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
Websocket proxy and consoles next steps #2451
Comments
One thing I'd like is to not have the websockify code directly in our source...if it's Ruby, we can use a gem, but even with the python one, can we use an egg? |
@Fryguy : according to the feature matrix above, the Ruby version is quite limited. But yes, based on features that we will want to support in the next release, we can either switch to the Ruby version or pack the Python version as an egg. |
Consoles in the SSUI
Considerations
|
Just for an experiment, I checked out if we have any kind of apache modules for websockets available in our appliances.
yay 😄 |
Cool, @skateman. The next step is to figure out how to manage the configuration of the web socket proxy process once it's running as a daemon. You need to
If you do it in memcache, then you should consider the load-balancing option. You'd need session affinity on the load balancer probably. |
So i took over this task and I experimented a bit with the
The implementation is fully rack-compatible and it can be mounted as a rails route, but it would be better to have this as a separate worker in production. For development it can be in the mount WsProxy.server => '/ws/console' if Rails.env.development? To continue with this I need a new worker, which will use a rackup file other than |
As @matthewd said EventMachine is evil, so I reimplemented the proxy on a lower level without EM. Some exception handling and refactoring is still required but I think I can demo it this week. |
@skateman : come on he did not say that! But cool 👍 |
model changes: #7224 |
REST API skeleton: #7178 |
@skateman @martinpovolny Now that #7078 is merged, can we remove the changes to expose ports 5900-5999 and listed here? https://github.com/ManageIQ/manageiq-appliance-build/blob/master/kickstarts/partials/post/firewalld.ks.erb#L24 I believe those were open because of that weird VNC console thing we did years ago (with the browser plugins and the MiqServer acting as a VNC proxy server). cc @bdunne @simaishi @jrafanie Can you comment on my thoughts here? |
Also, I merged ManageIQ/manageiq-appliance#61 since it was related to #7078 |
@martinpovolny It would be awesome to remove that. Do we need something else open on the firewall? |
@jrafanie nope, just close these ports |
That's awesome! 💖 ----- Reply message ----- @jrafanie: as @skateman wrote, we just close those. Everything is proxied through 443 now. Also all the SSL PITA is gone now. Have to update the docs. —You are receiving this because you were mentioned.Reply to this email directly or view it on GitHub |
This is very cool. Great job. Good write up AND good follow through removing the warts |
This issue has been automatically marked as stale because it has not been updated for at least 6 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! |
Ugh, just close this PR, it's done! 😉 |
This issues is a place to collect inputs and designs for the next steps of the websocket proxy that we use for the HTML5 consoles and may use in the future for other console types, such as HTML5 ssh/terminal client or RDP console.
Ruby version
There's a ruby version of the python proxy that we have, but it lack's some feature of the python counterpart most notably SSL support:
https://github.com/kanaka/websockify/wiki/Feature_Matrix
Single proxy, multiple clients
There's a way to use one instance of the proxy for several clients:
This is a mode of operations that is heavily pushed by the RHEVM people. The main argument being that this way there are 2 secrets that have to be presented by the client -- the token for this file verified by the proxy and then the one-time password that is verified by the RHEVM or VMware SPICE or VNC backend.
From our point of view, it would be convenient to open just one port for the proxy not a port for each client that connects.
Client address checking
It would be convenient if the file above had the structure
token: host:port:client_addr
meaning that the proxy would also verify the source address from where the browser/client is supposed to connect. When we ask for the terminal ticket, we know the address of the client so we could use it.Actually it would make more sense to have the above in a database table, rather than a file/directory.
Management of connections
We need to implement management of entries in this file / database table to deal with closed or timed-out connections. We could also warn the user in the UI if he tries to connect to a VM where there's a recent connection from another client.
Websocket under apache
Another nice-to have feature would be the ability to pass an open connection from Apache to the websocket proxy in the appliance. That would allow us to have no extra port open for the websocket proxy and would allow the consoles to work seamlessly with self-signed certificates provided in the appliance.
SPICE (and/or VNC) w/o HTML5
As suggested here: http://talk.manageiq.org/t/spice-without-html5/660/ we could provide better user experience by supporting existing SPICE and VPN clients that are more capable than the HTML5 variants. Especially if such tools can be launched from a web browser.
Python version as a package
If we decide to keep the python version, we would like to distribute it in a standard way and not as part of our project. Probably an "egg"? RPM for the productized version?
Support for web balancers
Web balancers that I know about do not support any way of handling the connections that we do to the ports serving our ws:// wss://. To support any web balancers at all we need to implement "Websocket under apache" as suggested above.
If we implement the above then only the web balancers that support session affinity would work as the proxy is launched on the appliance that serves the request for the console UI.
To support balancers that do not support session affinity, we would need to be able to open the SPICE/VNC websocket proxy on any of the UI workers. To do that we would need to put the connection information into a database as suggested above under "Management of connections"
User feedback
The text was updated successfully, but these errors were encountered: