Puppet Class: linux_secured::fact_caching

Defined in:
manifests/fact_caching.pp

Overview

Parameters:

  • enabled (Boolean)
  • contains_sudo_noauthenticate_rules_ttl (String[1])
  • contains_sudo_nopasswd_rules_ttl (String[1])
  • contains_sudo_timestamp_timeout_ttl (String[1])
  • forward_files_ttl (String[1])
  • home_directories_not_owner_by_user_ttl (String[1])
  • incorrect_configured_private_host_keys_ttl (String[1])
  • incorrect_configured_public_host_keys_ttl (String[1])
  • netrc_files_ttl (String[1])
  • privileged_commands_ttl (String[1])
  • repos_with_gpg_disabled_ttl (String[1])
  • restricted_sudo_group_ttl (String[1])
  • rhosts_files_ttl (String[1])
  • system_accounts_wih_invalid_shell_ttl (String[1])
  • system_accounts_with_usable_password_ttl (String[1])
  • to_permissive_dot_files_ttl (String[1])
  • to_permissive_netrc_files_ttl (String[1])
  • to_permissve_home_directories_ttl (String[1])
  • ungrouped_files_and_directories_ttl (String[1])
  • unowned_files_and_directories_ttl (String[1])
  • users_with_long_expiration_ttl (String[1])
  • users_with_long_lock_periode_ttl (String[1])
  • users_with_pwdchange_in_future_ttl (String[1])
  • users_with_short_expiration_ttl (String[1])
  • users_with_short_warning_periode_ttl (String[1])
  • users_without_home_directory_ttl (String[1])
  • users_without_password_ttl (String[1])
  • world_writable_files_ttl (String[1])


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'manifests/fact_caching.pp', line 1

class linux_secured::fact_caching (
  Boolean   $enabled,
  String[1] $contains_sudo_noauthenticate_rules_ttl,
  String[1] $contains_sudo_nopasswd_rules_ttl,
  String[1] $contains_sudo_timestamp_timeout_ttl,
  String[1] $forward_files_ttl,
  String[1] $home_directories_not_owner_by_user_ttl,
  String[1] $incorrect_configured_private_host_keys_ttl,
  String[1] $incorrect_configured_public_host_keys_ttl,
  String[1] $netrc_files_ttl,
  String[1] $privileged_commands_ttl,
  String[1] $repos_with_gpg_disabled_ttl,
  String[1] $restricted_sudo_group_ttl,
  String[1] $rhosts_files_ttl,
  String[1] $system_accounts_wih_invalid_shell_ttl,
  String[1] $system_accounts_with_usable_password_ttl,
  String[1] $to_permissive_dot_files_ttl,
  String[1] $to_permissive_netrc_files_ttl,
  String[1] $to_permissve_home_directories_ttl,
  String[1] $ungrouped_files_and_directories_ttl,
  String[1] $unowned_files_and_directories_ttl,
  String[1] $users_with_long_expiration_ttl,
  String[1] $users_with_long_lock_periode_ttl,
  String[1] $users_with_pwdchange_in_future_ttl,
  String[1] $users_with_short_expiration_ttl,
  String[1] $users_with_short_warning_periode_ttl,
  String[1] $users_without_home_directory_ttl,
  String[1] $users_without_password_ttl,
  String[1] $world_writable_files_ttl,
) {
  if $enabled {
    fact_config { 'contains_sudo_noauthenticate_rules':
      ttl => $contains_sudo_noauthenticate_rules_ttl,
    }

    fact_config { 'contains_sudo_nopasswd_rules':
      ttl => $contains_sudo_nopasswd_rules_ttl,
    }

    fact_config { 'contains_sudo_timestamp_timeout':
      ttl => $contains_sudo_timestamp_timeout_ttl,
    }

    fact_config { 'forward_files':
      ttl => $forward_files_ttl,
    }

    fact_config { 'home_directories_not_owner_by_user':
      ttl => $home_directories_not_owner_by_user_ttl,
    }

    fact_config { 'incorrect_configured_private_host_keys':
      ttl => $incorrect_configured_private_host_keys_ttl,
    }

    fact_config { 'incorrect_configured_public_host_keys':
      ttl => $incorrect_configured_public_host_keys_ttl,
    }

    fact_config { 'netrc_files':
      ttl => $netrc_files_ttl,
    }

    fact_config { 'privileged_commands':
      ttl => $privileged_commands_ttl,
    }

    fact_config { 'repos_with_gpg_disabled':
      ttl => $repos_with_gpg_disabled_ttl,
    }

    fact_config { 'restricted_sudo_group':
      ttl => $restricted_sudo_group_ttl,
    }

    fact_config { 'rhosts_files':
      ttl => $rhosts_files_ttl,
    }

    fact_config { 'system_accounts_wih_invalid_shell':
      ttl => $system_accounts_wih_invalid_shell_ttl,
    }

    fact_config { 'system_accounts_with_usable_password':
      ttl => $system_accounts_with_usable_password_ttl,
    }

    fact_config { 'to_permissive_dot_files':
      ttl => $to_permissive_dot_files_ttl,
    }

    fact_config { 'to_permissive_netrc_files':
      ttl => $to_permissive_netrc_files_ttl,
    }

    fact_config { 'to_permissve_home_directories':
      ttl => $to_permissve_home_directories_ttl,
    }

    fact_config { 'ungrouped_files_and_directories':
      ttl => $ungrouped_files_and_directories_ttl,
    }

    fact_config { 'unowned_files_and_directories':
      ttl => $unowned_files_and_directories_ttl,
    }

    fact_config { 'users_with_long_expiration':
      ttl => $users_with_long_expiration_ttl,
    }

    fact_config { 'users_with_long_lock_periode':
      ttl => $users_with_long_lock_periode_ttl,
    }

    fact_config { 'users_with_pwdchange_in_future':
      ttl => $users_with_pwdchange_in_future_ttl,
    }

    fact_config { 'users_with_short_expiration':
      ttl => $users_with_short_expiration_ttl,
    }

    fact_config { 'users_with_short_warning_periode':
      ttl => $users_with_short_warning_periode_ttl,
    }

    fact_config { 'users_without_home_directory':
      ttl => $users_without_home_directory_ttl,
    }

    fact_config { 'users_without_password':
      ttl => $users_without_password_ttl,
    }

    fact_config { 'world_writable_files':
      ttl => $world_writable_files_ttl,
    }
    include linux_secured::clear_caches
  } else {
    #
    # On puppet versions older than V6, the required libs
    # for fact_config are not installed. Because it also doesn't
    # serve any purpose, we skip this part on those versions.
    #
    if versioncmp($clientversion, '6.0.0') != -1 {
      #
      # Disable fact caching for all ora_install facts
      #
      $linux_secured_facts = [
        'contains_sudo_noauthenticate_rules',
        'contains_sudo_nopasswd_rules',
        'contains_sudo_timestamp_timeout',
        'forward_files',
        'home_directories_not_owner_by_user',
        'incorrect_configured_private_host_keys',
        'incorrect_configured_public_host_keys',
        'netrc_files',
        'privileged_commands',
        'repos_with_gpg_disabled',
        'restricted_sudo_group',
        'rhosts_files',
        'system_accounts_wih_invalid_shell',
        'system_accounts_with_usable_password',
        'to_permissive_dot_files',
        'to_permissive_netrc_files',
        'to_permissve_home_directories',
        'ungrouped_files_and_directories',
        'unowned_files_and_directories',
        'users_with_long_expiration',
        'users_with_long_lock_periode',
        'users_with_pwdchange_in_future',
        'users_with_short_expiration',
        'users_with_short_warning_periode',
        'users_without_home_directory',
        'users_without_password',
        'world_writable_files',
      ]

      fact_config { $linux_secured_facts:
        ttl => absent,
      }
    }
  }
}