Safeguard for Sudo Policy Evaluation
Safeguard for Sudo enhances traditional sudo by providing centralized services for policy evaluation, as well as event and keystroke logging. Safeguard for Sudo provides continuity of service in the event of a network or server outage by means of off-line policy evaluation.
Sudo off-line policy evaluation is available when using the Sudo Plugin joined to a policy server that evaluates a sudoers policy.
How it works
The Sudo Plugin package provides a cache service by installing a client version of the policy server daemon (pmmasterd) on the Plugin host. When you configure and join the host to a policy server, it sets up the policy management subsystem, and checks out the cache’s copy of the security policy from the central repository on the primary policy server.
When you run a sudo command, it sends the initial Sudo Plugin request to the cache service running on the Plugin host. In most cases, the cache service forwards the request to a central policy server on the network. However, if the cache service does not receive a timely response from a central policy server, it services the request locally, performing an off-line evaluation of the cached policy and storing the event and keystroke logs in a temporary holding location on the Plugin host (under /var/opt/quest/qpm4u/offline/).
You can configure the time period before an off-line policy evaluation occurs by adding the offlineTimeout setting in the /etc/opt/quest/qpm4u/pm.settings file. offlineTimeout defaults to 1500 milliseconds (1.5 seconds). To modify that setting, specify the timeout period in milliseconds as an integer value. For example, to set a timeout of 5 seconds (5000 milliseconds), enter the following into the pm.settings file:
Setting offlineTimeout to 0 in the pm.settings file, forces the cache service to always perform off-line (local-only) policy evaluation for sudo requests.
Once an off-line policy evaluation has occurred, the pmloadcheck daemon periodically checks to see if any policy server has come back online. Upon returning to an online state, the pmloadcheck daemon initiates a log file transfer to copy the logs to a temporary quarantine area on the policy server (/var/opt/quest/qpm4u/quarantine). The policy server validates the integrity of the log files in the quarantine and processes them, appending events to the central log store.
Determining off-line events
When off-line policy evaluation occurs, the cache service’s pmmasterd process writes a message to the pmmasterd.log file located in either /var/log or /var/adm, depending on your operating system, and is configurable in the /etc/opt/quest/qpm4u/pm.settings file.
Once processed into a policy server’s central event store, you can identify off-line events by examining the offlinesession event variable (pmlog -c "offlinesession==1") or the masterhost variable which is set to the Plugin host’s hostname.
Off-line policy cache updates
At regular intervals and whenever a request is sent to a central policy server for online evaluation, the pmloadcheck daemon checks the revision number of the cached policy. You can also use the pmpolicyplugin utility to display the revision status of the cached policy or to request an update. See pmpolicyplugin for more information about this utility.