Skip to content

fix port sorting in generated firewall rules file#291

Open
igolman wants to merge 10 commits into
sous-chefs:mainfrom
igolman:main
Open

fix port sorting in generated firewall rules file#291
igolman wants to merge 10 commits into
sous-chefs:mainfrom
igolman:main

Conversation

@igolman
Copy link
Copy Markdown

@igolman igolman commented Dec 13, 2023

Description

given ports argument als array of strings like:

firewall_rule 'allow some ports' do
  port %w(80 88 389 443 464 636)
  source '10.10.10.10'
end

generates in /etc/default/ufw-chef.rules file:
ufw allow in proto tcp to any port 389,443,464,636,80,88 from 10.10.10.10 comment "allow some ports"

after this fix:
ufw allow in proto tcp to any port 80,88,389,443,464,636 from 10.10.10.10 comment "allow some ports"

Issues Resolved

Correct generation of firewall rules.

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

@igolman igolman requested a review from a team as a code owner December 13, 2023 22:27
@damacus damacus added the Release: Patch Release to Chef Supermarket as a version patch when merged label Dec 20, 2023
@damacus
Copy link
Copy Markdown
Member

damacus commented Dec 21, 2023

Can you update the changelog as per the PR comments please 👍🏼

@igolman
Copy link
Copy Markdown
Author

igolman commented Dec 21, 2023

Can you update the changelog as per the PR comments please 👍🏼

Done.

damacus
damacus previously approved these changes Jan 3, 2024
@damacus damacus enabled auto-merge (squash) January 3, 2024 16:23
@Stromweld
Copy link
Copy Markdown
Contributor

Please look into failing tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release: Patch Release to Chef Supermarket as a version patch when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants