keystroke.5 (2012 03)

k
keystroke(5) keystroke(5)
NAME
RBAC keystroke logging feature
DESCRIPTION
The keystroke logging feature supports the logging of terminal input (stdin) for user login sessions and,
optionally, the corresponding terminal output (stdout and stderr). This feature is configured by modifying
the
/etc/rbac/key_filter
and the /etc/rbac/rbac.conf
configuration files. For details, see
key_filter (4) and rbac.conf (4).
Authorized users can modify the
/etc/rbac/key_filter
file to create a customized keystroke log-
ging policy for logging terminal input, and optionally the corresponding output, for all users or only a
subset of users based on user names, user groups, or role membership.
The
/etc/rbac/key_filter
file can be configured to log an entire session or to only start logging
when the user inputs a string that matches a regular expression string. In the latter case, a configurable
backward count and forward count impose a limit on the number of input characters directly preceding
and following the line of input that triggered keystroke logging. A configurable limit is also imposed on
the number of output characters logged for each line of input preceding the line of input that triggered
keystroke logging (see the description of the
KEY_STROKE_MAX_OUTPUT_SAVED
parameter in
rbac.conf (4)). There is no limit imposed on the number of output characters logged for each line of input
entered after the line of input that triggered keystroke logging.
The keystroke logging policy defined in
/etc/rbac/key_filter
is only enforced if the
KEY_STROKE_LOGGING
parameter in /etc/rbac/rbac.conf is set to a value that enables keys-
troke logging. For details, see rbac.conf (4).
CONFIGURATION
This section describes how keystroke logging can be configured to implement a customized keystroke log-
ging policy. For a description of the syntax of individual entries in
/etc/rbac/key_filter
and
/etc/rbac/rbac.conf
, see key_filter (4) and rbac.conf (4) respectively.
To log all keystrokes (standard input) for all users, the following set of conditions must be met:
Keystroke logging is enabled by the
KEYS_STROKE_LOGGING
parameter in
/etc/rbac/rbac.conf
.
The
/etc/rbac/key_filter
file does not exist or contains only a single non-commented line
with one of the following strings:
ks_all (Standard input, output and error are logged)
ks_stdin (Only standard input is logged)
Under these conditions, there is no user-specific policy in place and all keystrokes are logged as if every
user has an individual
/etc/rbac/key_filter
entry indicating that all keystrokes are logged for
that user. If
/etc/rbac/key_filter
does not exist, then the behavior is the same as if ks_all is
specified.
If keystroke logging is not configured to log all users’ keystrokes, then the keystrokes of a specific user are
only logged under the following set of conditions:
Keystroke logging is enabled by the
KEYS_STROKE_LOGGING parameter in
/etc/rbac/rbac.conf.
The
/etc/rbac/key_filter file contains at least one valid entry for which the following are
both true:
The entry is a user entry for that user, or is a group entry for that user’s primary group, or is a
role entry for a role to which that user is assigned.
The PatternText field (as described in the
CONFIGURATION FILE SYNTAX section in
key_filter (4)) is set to either the single wildcard character (*) or to a regular expression string
that matches characters that the user entered on standard input (i.e., the command line).
If
/etc/rbac/key_filter contains no valid entries for the user who logs in, then neither input nor
output streams are logged for that user session.
If a user has more than one valid entry that triggers keystroke logging, the entry listed first determines
which configuration settings described below (i.e., backward count, forward count, filestream) are used for
that session; those configuration settings are in place for the remaining of the session if that entry
HP-UX 11i Version 3: March 2012 1 Hewlett-Packard Company 1

Summary of content (6 pages)