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

(MODULES-10391) ssl_protocol includes SSLv2 and SSLv3 on all platforms #1990

Merged
merged 5 commits into from
Jan 21, 2020
Merged

(MODULES-10391) ssl_protocol includes SSLv2 and SSLv3 on all platforms #1990

merged 5 commits into from
Jan 21, 2020

Conversation

legooolas
Copy link
Contributor

(Reported as MODULES-10391)

The default for the apache::mod::ssl_protocol parameter was changed to allow SSLv2 and SSLv3 on all platforms, which isn't desirable on anything with an older version of OpenSSL. Noticed on CentOS 7 hosts after upgrading this module, without changing any parameters.

Hence this PR is to move the default setting to the params class and only set it for RHEL 8, which appears to be in the intention of the prior change in FM-8721 (PR #1691

This then fixes this regression on other platforms.

@legooolas legooolas requested a review from a team as a code owner January 9, 2020 12:23
manifests/params.pp Outdated Show resolved Hide resolved
@TwizzyDizzy
Copy link

TwizzyDizzy commented Jan 10, 2020

Thanks for reporting this... I just discovered this commit and am baffled that this kind of change could ever pass review with this kind of inconspicuous commit message. Also this should never have been committed as combined commit but as seperate commits to keep things atomic.

This also raises questions about quality control at puppetlabs and I would indeed appreciate a statement how those kind of dangerous changes can be avoided in the future.

But to also be totally clear on the front of responsibility: The fact that this hit me is MY fault for not reviewing carefully enough. I just wanted to point out that these kind of changes are bad practice and the harmless commit message puts the cherry on the pie.

/cc ing @sheenaajay here!

manifests/params.pp Outdated Show resolved Hide resolved
@sheenaajay
Copy link
Contributor

@legooolas Thanks for submitting this PR. Apologise for this. Will review them and get it in asap.Thanks again.

@sheenaajay
Copy link
Contributor

@TwizzyDizzy Thanks for the valuable feedback. Apologies, Will get the changes reviewed and merged. Running them on Adhoc pipeline.

$ssl_protocol = ['all'] # Implementations of the SSLv2 and SSLv3 protocol versions have been removed from OpenSSL (and hence mod_ssl) because these are no longer considered secure. For additional documentation https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/setting-apache-web-server_deploying-different-types-of-servers
} else {
$ssl_protocol = [ 'all', '-SSLv2', '-SSLv3' ]
}

Choose a reason for hiding this comment

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

Since this module has a dependency on Puppet >= 5.5.10 I'd love for new parameters to be added to Hiera files instead of using params.pp.

I'm not sure what your policy is, so it might be out of the question, but it seems a bit silly to continue using the deprecated params.pp style defaults when you can use Hiera instead. I'd even prefer to keep params.pp around (until parameters can be migrated to Hiera), and use Hiera for any new parameters, even if it means that both systems will be used for a while.

Choose a reason for hiding this comment

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

...and as per https://puppet.com/docs/puppet/latest/hiera_migrate.html#adding_hiera_data_to_a_module using Hiera is the preferred way:

Modules need default values for their class parameters. Before, the preferred way to do this was the “params.pp” pattern. With Hiera 5, you can use the “data in modules” approach instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again this is just to match the existing manifests, and updating to use hiera module data should probably be a separate PR to change this for all params at once.

Choose a reason for hiding this comment

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

Yes, I understand that. I'd simply prefer to start moving parameters to Hiera now, instead of doing it at Optional[String] $future_date -- Hiera is just so much easier to comprehend and maintain than params.pp 😄

@sheenaajay
Copy link
Contributor

@legooolas Apologies for the regression.
Thanks for reporting the error and opening the PR.
Will update the PR with the fix for the Travis failures and will update the tests.Thank you.

@sheenaajay sheenaajay changed the title ssl_protocol includes SSLv2 and SSLv3 on all platforms (MODULES-10391) ssl_protocol includes SSLv2 and SSLv3 on all platforms Jan 20, 2020
@sheenaajay
Copy link
Contributor

sheenaajay commented Jan 20, 2020

@legooolas Following changes are committed to this PR.

  1. Use versioncmp($::operatingsystemrelease, '8.0') to compare the versions
  2. Added unit tests to verify the default values of ssl_protocol
  3. Added acceptance tests to verify the default values of sll_protocol wrt different OS.
  4. Travis is running green
  5. Ran release checks on this branch too

Screen Shot 2020-01-20 at 13 39 01

Copy link
Contributor

@carabasdaniel carabasdaniel left a comment

Choose a reason for hiding this comment

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

👍 LGTM

@DavidS DavidS merged commit 3f6862f into puppetlabs:master Jan 21, 2020
cegeka-jenkins pushed a commit to cegeka/puppet-apache that referenced this pull request Jul 15, 2020
(MODULES-10391) ssl_protocol includes SSLv2 and SSLv3 on all platforms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants