RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2091034 - [RFE] Support other tools for administrative task (except sudo)
Summary: [RFE] Support other tools for administrative task (except sudo)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cockpit
Version: 8.6
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Martin Pitt
QA Contact: Jan Ščotka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-27 11:54 UTC by Oliver Ilian
Modified: 2022-11-08 12:31 UTC (History)
3 users (show)

Fixed In Version: cockpit-275-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 10:48:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-123553 0 None None None 2022-05-27 12:05:20 UTC
Red Hat Product Errata RHBA-2022:7718 0 None None None 2022-11-08 10:48:18 UTC

Description Oliver Ilian 2022-05-27 11:54:07 UTC
Description of problem:
Customer is looking into using Cockpit but is not allowed internally to use sudo for admin tasks. The third party tool used for this customer is "BoKS" (https://www.helpsystems.com/products/privileged-access-management)

Version-Release number of selected component (if applicable):
RHEL 8 and 9

Statement from customer:

BoKS provides us with central user management, including a sudo-like privileges elevation method.
Cockpit, as it appears, does not provide any way to have it use a custom privileges elevation other than sudo.
This would make Cockpit unsuitable for any internal department using RHEL system.

Therefore, this question/request is to see if it is possible to have Cockpit use a custom or third-party way of privileges elevation.

Comment 2 Marius Vollmer 2022-06-21 11:19:29 UTC
(In reply to Oliver Ilian from comment #0)
 
> Therefore, this question/request is to see if it is possible to have Cockpit
> use a custom or third-party way of privileges elevation.

In general, this is a very reasonable request. Cockpit has the infrastructure in place to configure alternative methods to start a "privileged bridge" (which is the process that will carry out privileged tasks).  Cockpit ships with two such methods already configured in "/usr/share/cockpit/shell/manifest.json", and more can be added.

However, the current UI of Cockpit is only able to use the "sudo" configuration.  Other methods, including the pre-installed "pkexec" one, can not be activated, and have not been tested for some time.

Thus, enhancing Cockpit to support arbitrary privilege escalation methods is well within reach, but requires some development effort in Cockpit itself.

Can you point to an example of how BoKS is used, such as for running "dnf update" on the terminal?

Comment 3 Oliver Ilian 2022-06-21 11:38:11 UTC
(In reply to Marius Vollmer from comment #2)

> Can you point to an example of how BoKS is used, such as for running "dnf update" on the terminal?

Hi Marius,

that sounds very promising. The customer replied with an example:

****
A normal way for a user that has 'sudo all' would be to use something like:
sx su - root -c "yum check-updates"


Our users would define 'access rules" for the Non-Personal Accounts, and for instance, a Non-Personal Account that can perform any command with root permissions would get a rule as:
/bin/su - root -c *

Effectively means any command (hence the * wildcard).
****

Does that help or would you need more information?

Comment 4 Marius Vollmer 2022-06-21 13:45:07 UTC
(In reply to Oliver Ilian from comment #3)
> (In reply to Marius Vollmer from comment #2)
> 
> A normal way for a user that has 'sudo all' would be to use something like:
> sx su - root -c "yum check-updates"

I see.  Users who want to have admin access in Cockpit would have to allow something like

    sx su - root -c "cockpit-bridge --privileged"

> Does that help or would you need more information?

It would be interesting to see a full interaction.  Are there any prompts, for example?  And of course, documentation for BoKS and "sx" would be interesting.

I think we need to experiment a bit if we want to make concrete plans... Can we get access to a box that has "sx" on it?  Or can you build/run custom versions of Cockpit?  This is probably as easy as unpacking a tarball that I give you into ~/.local/share/cockpit/.

Comment 5 Oliver Ilian 2022-06-21 14:13:03 UTC
(In reply to Marius Vollmer from comment #4)
> It would be interesting to see a full interaction.  Are there any prompts,
> for example?  And of course, documentation for BoKS and "sx" would be
> interesting.
> 
> I think we need to experiment a bit if we want to make concrete plans... Can
> we get access to a box that has "sx" on it?  Or can you build/run custom
> versions of Cockpit?  This is probably as easy as unpacking a tarball that I
> give you into ~/.local/share/cockpit/.


The customer offered that we can have a video conference and share their screen to show the process. I do not have a system with sx installed or the documentation.

Would you be interested in a video call?

Comment 6 Marius Vollmer 2022-06-22 09:11:52 UTC
> Would you be interested in a video call?

Yeah, why not.  A screen recording of someone running "sx su - root -c 'yum check-updates'" to completion would also be fine.

Just to set expectations: I don't think this will result in Cockpit officially supporting BoKS, but Cockpit could support "3rd party privilege escalation tools" and the customer would have to figure out how to translate the sx prompts (if there are any) into the Cockpit "auth" protocol messages, similar to what /usr/libexec/cockpit-pass does for sudo.

Comment 7 Marius Vollmer 2022-06-22 10:02:34 UTC
I have filed https://issues.redhat.com/browse/COCKPIT-863 for future planning.

Comment 8 Matej Marušák 2022-08-19 08:19:52 UTC
This has been implemented in upstream: https://github.com/cockpit-project/cockpit/pull/17536

Comment 13 errata-xmlrpc 2022-11-08 10:48:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (cockpit bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7718


Note You need to log in before you can comment on or make changes to this bug.