(PIE-929) Fix module to work on FIPS servers #159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this change, this module could not function on FIPS enabled
host operating systems and FIPS enabled Puppet servers. The reason is
this module consumes the
net/httpandnet/httpsgems directly. Thesegems cannot function in FIPS environments.
This change allows the module to detect when it's running in a FIPS
environment and switch to using Puppet servers build in HTTP object.
Puppet server consumes a java library called Bouncy Castle that is FIPS
compliant. The Puppet server code base uses Clojure code to create an
object that Ruby code running in JRuby can consume. It keeps a pool of
these objects and this module can now grab an instance of one of these
clients to do HTTP calls.
The drawback to this approach for now is that we lose some custom
functionality when using Puppet server's client. We can no longer
support a standalone ca file for SSL authentication, and we cannot set
user customizable timeouts.
In order to add FIPS functionality in backwards compatible way, we
detect when we're in FIPS mode and use the Puppet server client, but the
rest of the time, for all of the existing users, we continue to use the
net/httpandnet/httpsgems directly.Summary
Detailed Description
Checklist
[ ] Draft PR?
[ ] Ensure README is updated
[ ] Any changes to existing documentation
[ ] Anything new added
[ ] Link to external Puppet documentation
[ ] Review Support Playbook for any needed updates
[ ] Tags
[ ] Unit Tests
[ ] Acceptance Tests
[ ] PR title is "(Ticket|Maint) Short Description"
[ ] Commit title matches PR title