Puppet Class: cis_security_hardening::rules::disable_tipc

Defined in:
manifests/rules/disable_tipc.pp

Summary

Ensure TIPC is disabled

Overview

The Transparent Inter-Process Communication (TIPC) protocol is designed to provide communication between cluster nodes.

Rationale: If the protocol is not being used, it is recommended that kernel module not be loaded, disabling the service to reduce the potential attack surface.

Examples:

class { 'cis_security_hardening::rules::disable_tipc':
    enforce => true,
}

Parameters:

  • enforce (Boolean) (defaults to: false)

    Enforce the rule



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'manifests/rules/disable_tipc.pp', line 20

class cis_security_hardening::rules::disable_tipc (
  Boolean $enforce = false,
) {
  if $enforce {
    case $facts['os']['name'].downcase() {
      'debian': {
        if $facts['os']['release']['major'] > '10' {
          $command = '/bin/false'
          kmod::blacklist { 'tipc': }
        } else {
          $command = '/bin/true'
        }
      }
      'redhat': {
        if $facts['os']['release']['major'] > '8' {
          $command = '/bin/false'
          kmod::blacklist { 'tipc': }
        } else {
          $command = '/bin/true'
        }
      }
      'ubuntu': {
        if $facts['os']['release']['major'] >= '20' {
          $command = '/bin/false'
          kmod::blacklist { 'tipc': }
        } else {
          $command = '/bin/true'
        }
      }
      default: {
        $command = '/bin/true'
      }
    }

    kmod::install { 'tipc':
      command => $command,
    }
  }
}