Age | Commit message (Collapse) | Author |
|
Add a function to validate an x509 RSA key pair
|
|
Put the tests using a valid certificate fixture together and put tests
using a valid key fixture together.
|
|
Test a valid certificate and valid key that have had 48 characters
removed from their middle, to simulate a malformed certificate and key.
Suggested by @DavidS in https://github.com/puppetlabs/puppetlabs-stdlib/pull/552
|
|
Add a function to validate an x509 RSA certificate and key pair, as
commonly used for TLS certificates.
The rationale behind this is that we store our TLS certificates and
private keys in Hiera YAML files, and poor indentation or formatting in
the YAML file could cause a valid certificate to be considered invalid.
Will cause the Puppet run to fail if:
- an invalid certificate is detected
- an invalid RSA key is detected
- the certificate does not match the key, i.e. the certificate
has not been signed by the supplied key
The test certificates I've used in the spec tests were generated using
the Go standard library:
$ go run $GOROOT/src/crypto/tls/generate_cert.go -host localhost
Example output:
==> cache-1.router: Error: Not a valid RSA key: Neither PUB key nor PRIV key:: nested asn1 error at /var/govuk/puppet/modules/nginx/manifests/config/ssl.pp:30 on node cache-1.router.dev.gov.uk
|
|
Add clamp function
|
|
Clamp keeps value within the range.
Employ of soft() makes the whole thing is independant of order.
|
|
adds new parser called is_absolute_path
|
|
Allow package_provider fact to resolve on PE 3.x
|
|
PE 3.x emits a puppetversion fact in the format "3.x.x (Puppet Enterprise 3.x.x)". This fact causes an error when invoked on PE 3.x: Could not retrieve fact='package_provider', resolution='<anonymous>': Malformed version number string 3.8.1 (Puppet Enterprise 3.8.1
This fix has been tested on PE 3.8.2 and should work for PE 3.3, 3.7, and 3.8.
Original-fix-by: Alex Harden <aharden@gmail.com>
|
|
(FM-3802) make ensure_resource test of packages
|
|
This ensures that the test passes independently of changes to rubygems.
|
|
|
|
* is_absolute_path returns boolean true if the given path
is absolute, returns false otherwise.
* works for windows and unix
|
|
4.10.x mergeback
|
|
edits to README
|
|
|
|
|
|
|
|
|
|
Changelog and versionbump for 4.10.0
|
|
|
|
(#2886) seeded_rand: new function
|
|
4.9.x Mergeback
|
|
seeded_rand is needed for repeatable randomness across nodes in a cluster
|
|
Add validator for any IP address
|
|
Provide a validator for IP addresses, regardless they are IPv4 or IPv6,
and its documentation.
|
|
4.9.1 release prep
|
|
|
|
Fix reference to validate_bool in IP4 function
|
|
The documentation in `validate_ipv4_address` references `validate_bool`,
but I believe this should read `validate_ipv4_address` instead, which
makes more sense.
|
|
Fix Gemfile to work with ruby 1.8.7
|
|
|
|
Use absolute class name in example
|
|
(FM-3773) Fix root_home fact on AIX 5.x
|
|
The -C (capital C) flag to lsuser is incorrect. It should be -c
(lowercase).
this commit updates the aix root_home fact to use `lsuser -c`, rather
than `lsuser -C`.
|
|
pick_default addition to readme
|
|
|
|
|
|
use properly encoded characters
|
|
This is more severe than it sounds. These characters make puppet fail with the following message :
> Error 400 on SERVER: "\xC3" on US-ASCII
|
|
Fix capitalize docs
|
|
Capitalize lower-cases the remaining characters (due to the Ruby function having this behavior); document this, and make minor wording tweaks.
|
|
(#2183) updated str2bool readme wording
|
|
|
|
add functionality to bool2str function
|
|
|
|
Add check to ensure regex does not throw for none type.
|
|
Add a quick check to ensure puppetversion value is not nil and supporting test.
|
|
Fix load module metadata
|
|
Some modules or module versions don't have a metadata.json file, but we
might still want to use the load_module_metadata function on them. The
lack of a file can still give us important information. For example, it
might tell us that the version of the module installed is "very old"
even if we can't read the version number directly. This patch adds a
parameter to let the user specify if an empty file is acceptable. To
preserve backwards compatibility it does not change the current default
behavior, which is to raise an error if metadata.json does not exist.
|