* The closing quotes after the `VALUE` attribute were not escaped. This
commit adds them
* The regex assumed that the short name does not contain whitespace.
I am looking at a Domino instance where the short name DOES contain
whitespace. This commit changes the regex such that the value is
assumed to not contain a quote before the closing quote. Of course,
there could be an escaped quote inside quotes in the HTML source, but
if we want to do it properly, we'd need an HTML parser which exceeds
my modest ruby skills.
* The fields `$dspHTTPPassword` and `dspHTTPPassword` (without the
dollar sign) can both contain the hash. The code assumed that only up
to one of those fields contain a hash. This leads to the hash being
printed twice in the output in my case.
Extensive refactoring to move away from directly manipulating datastore
options and use local variables instead.
The initial template generation method has been redesigned to use an
external file via Erubi::Engine which is much cleaner vs. jamming a
multiline string into the module.
Response HTML from vCenter is now parsed with Nokogiri HTML vs. pulling
it out with regex.
Registered options have been reworked, following suggestions and
feedback. The use of VHOST in particular eliminates the need to pass
RHOSTS to the template and makes the module behave more closely to "real"
vCenter (i.e., always uses FQDN for the destination).
Added advanced datastore options to control the token lifetime
NOT_BEFORE and NOT_AFTER skew, in seconds. This also uncovered a bug with
the way I was deriving Zulu time which skewed based on the local system
time zone offset from Zulu; this has been fixed.
Corrected a stupid typo in the validate_fqdn method (don't need to check
for capital letters if the test string is always downcase...)
validate_idp_options now uses File.binread and can process certs in keys
in DER or PEM instead of just PEM.
Code optimization, particularly around error handling; other minor
tweaks based on improved understanding of the Framework's capabilities.
Many style changes and modifications based on suggestions and feedback.
Documentation was updated to reflect reality.
Currently this module doesn't account for Server builds 2016 and above, nor Windows 10 builds. This PR fixes the `sysinfo` comparison to allow later builds.
Note: Many other modules have this problem, and it's probably worth Rapid7 staff time to standardize the usage of build comparisons inside modules.