Puppet Class: security_baseline::rules::common::sec_issue

Defined in:
manifests/rules/common/sec_issue.pp

Summary

Ensure local login warning banner is configured properly (Not Scored)

Overview

The contents of the /etc/issue file are displayed to users prior to login for local terminals. Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: m - machine architecture r - operating system release s - operating system name v - operating system version

Rationale: Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the “ uname -a ” command once they have logged in.

Examples:

class security_baseline::rules::common::sec_issue {
    enforce => true,
    message => 'Test',
    log_level => 'info'
}

Parameters:

  • enforce (Boolean) (defaults to: true)

    Enforce the rule or just test and log

  • message (String) (defaults to: '')

    Message to print into the log

  • log_level (String) (defaults to: '')

    The log_level for the above message



36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'manifests/rules/common/sec_issue.pp', line 36

class security_baseline::rules::common::sec_issue (
  Boolean $enforce = true,
  String $message = '',
  String $log_level = ''
) {
  if($facts['security_baseline']['issue']['os']['content'] != '') {
    echo { 'issue-os':
      message  => $message,
      loglevel => $log_level,
      withpath => false,
    }
  }
}