Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(FM-7625) implement finegrained configuration support for SSL verification #76

Merged
merged 6 commits into from
Mar 14, 2019

Conversation

Thomas-Franklin
Copy link
Contributor

This will make use of verify_mode control in order to do peer, client-once, or fail-no-peer verification.

Can also specify which ca_file to use for verification other wise it will use the certs in OpenSSL::X509::DEFAULT_CERT_FILE, e.g.:

ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'

The SHA256 fingerprint can be specified for additional verification.

@Thomas-Franklin
Copy link
Contributor Author

Will be adding unit tests tomorrow. So this is more for early review at this point.

@codecov
Copy link

codecov bot commented Feb 18, 2019

Codecov Report

Merging #76 into master will increase coverage by 0.13%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   99.02%   99.15%   +0.13%     
==========================================
  Files          39       39              
  Lines         919      948      +29     
==========================================
+ Hits          910      940      +30     
+ Misses          9        8       -1
Impacted Files Coverage Δ
lib/puppet/transport/panos.rb 100% <100%> (ø) ⬆️
lib/puppet/transport/schema/panos.rb 100% <100%> (ø) ⬆️
.../provider/panos_path_monitor/panos_path_monitor.rb 100% <0%> (+25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c5e590...4196c86. Read the comment docs.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@Thomas-Franklin
Copy link
Contributor Author

Tagging @clairecadman for the readme changes. @DavidS the changes proposed have been made I believe :-)

Copy link
Contributor

@DavidS DavidS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass over the code.

lib/puppet/util/network_device/panos/device.rb Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
ciphers: @ciphers ? @ciphers.join(':') : @ciphers,
verify_callback: ->(preverify_ok, cert_store) do
verify_callback(preverify_ok, cert_store)
end)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be able to directly convert the verify_callback method into a proc by using the syntax described in https://stackoverflow.com/a/4294660/4918

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did want to split it out to make it easier to test the method

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

lib/puppet/util/network_device/panos/device.rb Outdated Show resolved Hide resolved
lib/puppet/util/network_device/panos/device.rb Outdated Show resolved Hide resolved
lib/puppet/util/network_device/panos/device.rb Outdated Show resolved Hide resolved
lib/puppet/util/network_device/panos/device.rb Outdated Show resolved Hide resolved
spec/spec_helper_acceptance.rb Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@clairecadman clairecadman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see suggested changes. Thanks!

Thomas-Franklin added 2 commits March 14, 2019 16:26
This will make use of `verify_mode` control in order to do verification.

Can also specify which `ssl_ca_file` to use for verification other wise it will use the certs in `OpenSSL::X509::DEFAULT_CERT_FILE`, e.g.:

 `ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE'`

The SHA256 fingerprint can be specified for additional verification.
@DavidS DavidS added the feature New feature or request label Mar 14, 2019
@DavidS DavidS changed the title (FM-7625) ssl security checks (FM-7625) implement finegrained configuration support for SSL verification Mar 14, 2019
@DavidS DavidS merged commit eafc9db into puppetlabs:master Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants