hardening_stdlib

Shared functions for hardening modules

Hardening Framework

hardening

50,196 downloads

49,944 latest version

4.1 quality score

Version information

  • 0.1.2 (latest)
  • 0.1.1
  • 0.1.0
released May 16th 2014

Start using this module

Documentation

hardening/hardening_stdlib — version 0.1.2 May 16th 2014

Hardening Stdlib (puppet)

Description

Shared functions for hardening modules.

Requirements

  • Puppet; nothing else

Usage

merge_hardening

Try to set a hardening parameter. The user still has the option to override it, which will result in a warning.

Parameters

merge_hardening( $original, $hardening, [ $name_of_parameter ] )

The $name_of_parameter is optional, but highly recommended to know which parameter results in a Warning.

For simple values:

# Only defined by hardening:
# $original_option = undef
# $hardening_option = "off"
# $merged_option = "off"
$merged_option = merge_hardening( $original_option, $hardening_option, "param <name>" )

# User override:
# $original_option = "on"
# $hardening_option = "off"
# $merged_option = "on" (emits a warning)
$merged_option = merge_hardening( $original_option, $hardening_option, "param <name>" )

For maps:

# Only defined by hardening:
# $original_option = { a: "on" }
# $hardening_option = { b: "off" }
# $merged_option = { a: "on", b: "off" }
$merged_option = merge_hardening( $original_option, $hardening_option, "map <name>" )

# User override:
# $original_option = { a: "on", b: "on" }
# $hardening_option = { b: "off" }
# $merged_option = { a: "on", b: "on" } (emits a warning)
$merged_option = merge_hardening( $original_option, $hardening_option, "map <name>" )

getparam

Taken from stdlib 4.2. You don't need to require this version of stdlib, but still get access to this function. See: stdlib v4.2 getparam description

Contributors + Kudos

...

License and Author

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.