Add stdin parsing to puppet parser validate
(#11727) Support STDIN for `puppet parser validate`

This adds an acceptance test for the STDIN validation feature of the `puppet
parser validate` action.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#15731) Full certificate metadata for pson

When attempting to get certificate metadata using the REST API, the API
returns a different set of metadata based on whether one requests yaml
or pson, neither of which are the full set of metadata.
This commit adds dns_alt_names/subjectAltNames to the metadata for pson.
(#15731) explicit fingerprint digest for pson

The pson metadata for a certificate (or certificate request) contains a
fingerprint which was created with the default digest algorithm. This
algorithm must change as we move to FIPS 140-2 compliance because MD5 is
explicitly denied.
This commit includes fingerprint metadata for 3 stronger hashing
algorithms and explicitly calls out that the fingerprint is for that
algorithm.
(#15731) Move explicit fingerprints to hash

Move the explicit fingerprints for certificates and certificate requests
to a hash within the normal pson data. This commit makes the format of
the pson:
{
  ...
  fingerprint: <current fingerprint algorithm>
  fingerprints: {
    default: <current fingerprint algorithm>
    SHA1: <sha1 fingerprint>
    SHA256: <sha256 fingerprint>
    SHA512: <sha512 fingerprint>
  }
}

Clean up the tests to reduce duplication and improve clarity of what is
actually being tested in each case.
(#15560) Refactor LogonUser

Previously, the ADSI utility code validated a user's password by
attempting a network logon session as that user. However, the ability to
create a logon session and use the resulting process token is something
that is generally useful, in say the next commit.

This commit refactors the call to `LogonUser`, adds a helper method for
checking the validity of a password, and modifies the ADSI code to call
it.

The call to `LogonUser` remains the same except that the MSDN docs say to
specify a '.' as the domain for local user accounts, and we null out the
token handle prior to calling LogonUser instead setting it to
"\x20\x20\x20\x20" which could be interpreted as a valid handle.
(#15560) Create the user's profile if managehome is true

Previously, specifying `managehome => true` on a user resource would have
no effect even though the Windows ADSI user provider claimed to support
the `manages_homedir` feature.

On Windows, a user's homedir (profile) is not created when the user
account is created, but when the user logs in for the first time. As
a result, if Puppet created the user account, and then tried to apply
another resource that depended on the existence of the user's home
directory, such as ssh keys, then Puppet would fail.

This commit changes the Windows ADSI user provider such that if
`managehome` is enabled, then it will load and unload the user's profile.
This will create the profile if necessary and apply the appropriate DACL
to the profile and subdirectories.

This commit follows the Microsoft recommended way of creating a user
profile: http://support.microsoft.com/kb/196070/en-us
(#15560) Delete user's profile after deleting account

Previously, if Puppet deleted a user account and `managehome` was true,
then Puppet would leave behind the user profile on disk, e.g.
C:\Users\%USERNAME%.

In keeping with the semantics of the `manage_homedir` feature, this commit
modifies the Windows ADSI user provider to delete the user profile when
`managehome` is true.

On systems before Vista SP1, the Win32_UserProfile class does not exist.
Worse, there is no reliable and built-in way to delete user profiles.
There is the widely used delprof.exe utility included in the 2003 Resource
Kit, but it's not part of the core OS and it doesn't work in later
versions of Windows.

As a result, the Windows ADSI provider will make a best effort to delete
the user profile, and that should work on Vista SP1 and later systems. On
earlier systems, we will warn that it's not supported.

This commit also adds an acceptance test to verify the home directory
gets created, and deleted (on systems that support it).
Merge pull request #1088 from joshcooper/ticket/2.7.x/15560-managehome-windows

(#15560) Implement manages_homedir semantics on Windows
(#15731) Add clarifying comments to host.rb

Prior to this commit it was unclear that the existing :fingerprint
element of the pson hash was still around for backwards compatibility
for as of yet unknown external consumers of the existing api. This
commit makes it clear that that's why it's still around and that we
don't have any known internal consumers of that api.
Merge branch 'ticket/2.7.x/15731_full_certificate_metadata_for_pson' into 2.7.x

* ticket/2.7.x/15731_full_certificate_metadata_for_pson:
  (#15731) Add clarifying comments to host.rb
  (#15731) Move explicit fingerprints to hash
  (#15731) explicit fingerprint digest for pson
  (#15731) Full certificate metadata for pson
Merge pull request #876 from zaphod42/feature/2.7.x/11727-stdin-parsing-in-face

Feature/2.7.x/11727 stdin parsing in face