Improved Firewall handling
Open
Nobody has claimed this yet.
type/feature-request
- Dominant language
- Go
- Stars
- 466
- Forks
- 338
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 8
Description
Feature Request
Is your feature request related to a problem? Please describe:
tiup cluster check --applyonly temporarily disablesfirewalld.service. It does asystemctl stop, but not asystemctl disable/systemctl mask. This leaves this as a booby trap that will explode on next reboot.- Disabling the firewall doesn't seem to be the right action. Changing the
zonefrompublictotrustedseems to be a better option. - Some high security deployments might not allow one to disable the firewall
- The docs aren't clear that a host based firewall isn't recommended, but a network based firewall around the cluster is.
Describe the feature you'd like:
- Make sure whatever
tiup cluster check --applyis done in a persistent way that survives reboots - Don't disable the firewall. Change the zone instead.
- Extend documentation for what ports need to be open, both for host based firewalls and for network based firewalls around the cluster.
- Allow one to operate with a firewall enabled.
- Create service definitions for the firewall service which then can be added to the zone.
Why the featue is needed:
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
Related:
- https://github.com/pingcap/tiup/issues/1329
- https://github.com/pingcap/docs/pull/20081
- https://github.com/pingcap/tiup/blob/8e15a038a9fcd7c4562fc9839263609fb9eafe37/pkg/cluster/task/check.go#L105
- https://docs.pingcap.com/tidb/stable/best-practices-for-security-configuration#protect-internal-ports
- https://docs.pingcap.com/tidb/stable/hardware-and-software-requirements#network-requirements
- https://docs.pingcap.com/tidb/stable/best-practices-for-security-configuration#restrict-access-control
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pkg/cluster/task/check.go at the linked line and review related issue #1329, then compare the existing firewall behavior with the linked security and network documentation. Done means the requested firewall-enabled operation, persistent configuration, service definitions, and documentation for host- and network-based firewall ports are addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- devops, documentation, infrastructure, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100