-
Notifications
You must be signed in to change notification settings - Fork 271
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
Fixes #27932 - Add REX Cockpit support #760
Conversation
This only works with REX 1.8.3 and newer on RPMs.
@ekohl is there something I can help with? I'm pretty sure this will get decent testing after it's in :-) |
@ares this will also need an installer migration to expose the class. @iNecas confirmed in the other PR that it should indeed be the CA that's exposed by Foreman so I've pushed a change. Initially forgot to |
Sounds good, I will ask someone (@lzap 😉) to take a look at selinux when this is in. Right now, tests seems to be broken by last change. Once fixed, I'm happy to merge. |
What exactly is this deploying? A new service? A set of plugin configurations? |
There are files in https://github.com/theforeman/foreman_remote_execution/tree/master/extra/cockpit which are packaged as a -cockpit subpackage. This contains a service that runs on port 9999 that allows tunneling SSH over a websockets connection. It is running a private cockpit instance as well. It does connect back to Foreman to verify a token. The CA file is needed to verify the HTTPS connection to it. A cleaner approach would probably be to use JWT to sign it so it can be verified without a connection. It needs the cert and key to set up an authenticated connection to a Smart Proxy. I can't see whether it verifies that connection since it doesn't set up a CA to verify it. It could be made more secure by providing the client CA. This all depends on the REX plugin being deployed so it requires that. |
If I understand this correctly then it's the cockpit service which connect to port 9999 and not Foreman. Thus it will probably need a change in Cockpit policy rather than ours. |
@lzap the service that runs on 9999 is foreman specific, it's used for tunelling the connection over REX SSH connection. So I think our policy needs to be updated. |
mode => '0644', | ||
content => template('foreman/remote_execution_cockpit_session.yml.erb'), | ||
require => Foreman::Plugin['remote_execution-cockpit'], | ||
notify => Service['foreman-cockpit'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering a bit if this service name should be more specific. As I think I understand the comments, this is dependent entirely upon remote execution and is not a generic service for Foreman and cockpit. Something like foreman-rex-cockpit
or foreman-remote-execution-cockpit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case we should update it in packaging first since this mirrors that:
https://github.com/theforeman/foreman-packaging/blob/e61fc0b8bc36d9658bfa7bb4177aca60834a53e6/packages/plugins/rubygem-foreman_remote_execution/rubygem-foreman_remote_execution.spec#L95
Do I understand correctly that the service:
Are we using cockpit only to get the SSH -> websocket functionality as a convenience? Is there other functionality of the running cockpit instance being used? |
Is a description of all the connections laid out anywhere I can look at? |
This thread should have most of the context https://community.theforeman.org/t/seamless-cockpit-and-foreman/9846/23, This service is mainly focused on performing authentication, the tunneling is achieved with this combined with smart-proxy capabilities. Deferring to @mvollmer for more details. |
@ehelms do you want to block on this? Given most of the packaging changes have already been merged for some time. |
SELinux related question - where/how do we distribute file named It simply spawns Another concern is about the default port (9999), I need to check (I am in a train currently) however if it is already taken by existing policy we want probably to pick a different one which can be assigned a port type. |
https://github.com/theforeman/foreman_remote_execution/tree/master/extra/cockpit You're right that |
No, I won't block on the naming. Just express a strong desire for things to be named such that they reflect as specific as possible their use case in order to avoid confusion by users and developers. |
Does this new service need to be added to |
What is the progress on this? Can we get it in and open tracking issue on foreman-maintain? Is there something blocking this PR? It's hard to verify SElinux work without installer nightlies that would install it. |
This only works with REX 1.8.3 and newer on RPMs.
Replaces #748. It takes a different approach by making a separate class rather than a parameter.