-
-
Notifications
You must be signed in to change notification settings - Fork 881
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
Adds new SSL && protocol specific directives to mailhost setup #769
Conversation
The SSL setup customisation of a mailhost is very limited. To allow more directives to be set, the ssl configuration was extracted and arranged like the setup for a vhost. The setup was also expanded to customize protocol specific authentication method and capabilities.
…ific options in mailhost setup
…epend, in mailhost
Hi @dol, can you please rebase? |
btw, I also made a change in #909 that updates the default ciphers for the module, and has the default ciphers in the mailhost manifest inherited from |
@wyardley @bastelfreak Will perform an adjustment and rebase in the upcoming week. |
Thanks @dol |
@dol: just a reminder to rebase / squash if you've got the time. |
@wyardley I started with the rebase. Due to the divergency of the repo since February a rebase isn't that easy. Most of the work is done. But the test cases need some rearrangement. I'll keep you posted. |
Thanks for looking at it, yeah, there have been a lot of changes, so sorry that the conflicts will be a bit of a pain to resolve! It looks like I didn't notice that mailhost.erb had the SSL thing in #930 for the case where STARTTLS is enabled; that's a good catch. Seems almost like (even if they're under separate listeners), the SSL parameters should just be generated once (maybe an additional template that gets included twice?) to keep things in sync and to make it more DRY, but it's fine to just sync them up for now. |
ps - Feel free to ping me or @bastelfreak on #voxpupuli in Puppet Slack or on IRC if you want to chat about it more. |
I merged and updated the PR. Next steps are:
@wyardley The unification of the common parts are part of the initial PR. See https://github.com/voxpupuli/puppet-nginx/pull/769/files#diff-a9378fe4f575a8c57d256e37d135f6ccR38 |
@dol Thanks for the hard work! Will take a look over the code as well and see if anything sticks out. Note that the tests are passing except the rubocop; there are some warnings there that you'll need to resolve before we can merge. Looking at the commits, it looks like maybe an unrelated commit made it in? If it ends up being too difficult to squash, you can also make a new branch and create a new PR off of that one. |
}, | ||
{ | ||
title: 'should not enable IPv6', | ||
attr: 'ipv6_enable', | ||
value: false, | ||
notmatch: %r{ listen \[::\]:80 default ipv6only=on;} | ||
notmatch: %r{ listen \[::\]:80 default ipv6only=on;} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to keep the spacing as it was before? In general, the module seems to use just a space or two after parameters, so I think it will be a little inconsistent if the spacing changes here. If we change the way we handle spacing, we'll probably need to do it on a module-wide basis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, nevermind, I see that it's already indented in the existing ones.
end | ||
end | ||
end | ||
end | ||
end | ||
|
||
describe 'mailhost template content (SSL enabled)' do | ||
describe "mailhost template content for imap" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Rubocop will also flag this, but use single quotes if there are no interpolated variables.
This is also great, thank you for making that change. Overall, I think if we can get this with the rubocop tests passing and commits squashed, I think we can merge this after one other person doing a quick review. However, it does look like there have been some merges vs. rebases in the branch, so may be easier to just do a diff, and apply it to a new branch. Let us know if you need help getting it squashed. I know it's possible to do a squash merge in, but generally, Voxpupuli requires that the commits be squashed prior to merging. |
Looking much better. Can you please also address the complaints from Rubocop? IMO, it's easier to clean those up as you go. |
@dol: Do you think you'll have time to rework this a bit more... re-rebase, sqash commits, etc? Fixing the rubocop warnings isn't too hard. If not, let me know and I can give it a shot. I like breaking the common template out, but I'm thinking we should maybe use concat rather than embedding the template in another template where possible? @bastelfreak: thoughts? I have a sort-of in-progress change going here: |
@wyardley I found time to resolve the issues and performed some minor glitches that where introduced into the master during the last rebase. |
@dol Thanks so much for persisting with this and making all those changes. I think this will really improve things in that section of the module! |
…puli#769) * Adds new SSL && protocol specific directives to mailhost setup The SSL setup customisation of a mailhost is very limited. To allow more directives to be set, the ssl configuration was extracted and arranged like the setup for a vhost. The setup was also expanded to customize protocol specific authentication method and capabilities. * Extended test cases to include newly introduced ssl and protocol specific options in mailhost setup * support raw_prepend, raw_append, mailhost_cfg_append, mailhost_cfg_prepend, in mailhost * Fixes rubocop issues * Render template without a new line * Fixes typo in mailhost.pp * Fix inlining after merge and dropping newlines when rendering a template
…puli#769) * Adds new SSL && protocol specific directives to mailhost setup The SSL setup customisation of a mailhost is very limited. To allow more directives to be set, the ssl configuration was extracted and arranged like the setup for a vhost. The setup was also expanded to customize protocol specific authentication method and capabilities. * Extended test cases to include newly introduced ssl and protocol specific options in mailhost setup * support raw_prepend, raw_append, mailhost_cfg_append, mailhost_cfg_prepend, in mailhost * Fixes rubocop issues * Render template without a new line * Fixes typo in mailhost.pp * Fix inlining after merge and dropping newlines when rendering a template
The SSL setup customisation of a mailhost is very limited. To allow
more directives to be set, the ssl configuration was extracted and
arranged like the setup for a vhost.
The setup was also expanded to customize protocol specific authentication
method and capabilities.