Questo contenuto non è disponibile nella lingua selezionata.
Chapter 2. Deploying Session Recording on RHEL web console
This section describes how to deploy the Session Recording solution on the Red Hat Enterprise Linux web console.
To be able to deploy the Session Recording solution you need to have the following packages installed:
-
tlog - SSSD
-
cockpit-session-recording
2.1. Installing tlog Copia collegamentoCollegamento copiato negli appunti!
Install the tlog packages.
Procedure
Use the following command:
yum install tlog
# yum install tlogCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2. Installing cockpit-session-recording Copia collegamentoCollegamento copiato negli appunti!
The basic web console packages are a part of Red Hat Enterprise Linux 8 by default. To be able to use the Session Recording solution, you have to install the cockpit-session-recording packages and start or enable the web console on your system:
Procedure
Install
cockpit-session-recording.yum install cockpit-session-recording
# yum install cockpit-session-recordingCopy to Clipboard Copied! Toggle word wrap Toggle overflow Start or enable the web console on your system:
systemctl start cockpit.socket systemctl enable cockpit.socket
# systemctl start cockpit.socket # systemctl enable cockpit.socketCopy to Clipboard Copied! Toggle word wrap Toggle overflow or
systemctl enable cockpit.socket --now
# systemctl enable cockpit.socket --nowCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.3. Enabling session recording for users and groups with SSSD from the CLI Copia collegamentoCollegamento copiato negli appunti!
If you use SSSD for authentication, you can configure session recording for users and groups from the command line.
Procedure
Open the
sssd-session-recording.confconfiguration file:vi /etc/sssd/conf.d/sssd-session-recording.conf
# vi /etc/sssd/conf.d/sssd-session-recording.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe
sssd-session-recording.conffile is created automatically once you have opened the configuration page in the web console interface.To specify the scope of session recording, enter one of the following values for the scope option:
-
noneto record no sessions. -
someto record only specified sessions. -
allto record all sessions.
-
-
Optional: If you set the scope as
someadd the names of users and groups in comma-separated lists. To enable the SSSD profile, run the following command:
authselect select sssd with-files-domain
# authselect select sssd with-files-domainCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Example 2.1. SSSD configuration
In the following example users example1 and example2, and group examples have session recording enabled.
[session_recording] scope = some users = example1, example2 groups = examples
[session_recording]
scope = some
users = example1, example2
groups = examples
2.4. Enabling session recording for users and groups with SSSD from the web UI Copia collegamentoCollegamento copiato negli appunti!
If you use SSSD for authentication, you can configure session recording for users and groups in the RHEL 8 web console.
Procedure
-
Connect to the RHEL 8 web console locally by entering
localhost:9090or by entering your IP address<IP_ADDRESS>:9090into your browser. Log in to the RHEL 8 web console.
ImportantYour user has to have administrator privileges to be able to view recorded sessions.
- Go to the Session Recording page in the menu on the left.
Click on the gear button in the right top corner.
Set your parameters in the SSSD Configuration table. Separate the lists of users and groups with commas.
Example 2.2. Configuration of recorded users with SSSD
2.5. Enabling session recording for users without SSSD Copia collegamentoCollegamento copiato negli appunti!
Red Hat recommends configuring your recorded users using SSSD, either from the command line or directly from the RHEL 8 web console.
Without SSSD, there is no centralized management for policies. Administrators must set the shell for each user on every system individually, which makes it difficult to scale across multiple systems. Group-based configurations or exclusions such as exclude_users and exclude_groups are also not available. Additionally, tools like Cockpit Session Recording are designed to work with SSSD and might not function as expected without it.
To enable session recording without SSSD, change the shell of the user you want to record to
/usr/bin/tlog-rec-session.sudo usermod -s /usr/bin/tlog-rec-session <user_name>
# sudo usermod -s /usr/bin/tlog-rec-session <user_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow The system uses the configuration in the
tlog-rec-session.conffile to determine the user’s working shell.
2.6. Exporting recorded sessions to a file Copia collegamentoCollegamento copiato negli appunti!
You can export your recorded sessions and their logs and copy them.
The following procedure shows how to export recorded sessions on a local system.
Prerequisites
Install the
systemd-journal-remotepackage.yum install systemd-journal-remote
# yum install systemd-journal-remoteCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure
Create a directory to store exported recording sessions, such as `/tmp/dir:
mkdir /tmp/dir
# mkdir /tmp/dirCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
journalctl -o exportcommand to export system journal entries related to tlog recordings:journalctl _COMM=tlog-rec _COMM=tlog-rec-sessio -o export | /usr/lib/systemd/systemd-journal-remote -o /tmp/dir/example.journal -
# journalctl _COMM=tlog-rec _COMM=tlog-rec-sessio -o export | /usr/lib/systemd/systemd-journal-remote -o /tmp/dir/example.journal -Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe
COMM=tlog-rec-sessioCOMM name is shortened due to a 15 character limit.