Applicable scenario
- Product:
ZCF - Component:
Cloud - Versions:
4.8.x, 4.6.x - Deployment topology: dual management nodes
- Trigger: A vulnerability scan finds exposed
go-pprofandetcdports and unauthorized Redis access.
Symptoms
- The environment has:
poc-yaml-go-pprof-leakpoc-yaml-etcd-unauth- Unauthorized Redis access
- Remediation focuses on:
90912379- Redis authentication configuration
Determination method
- Confirm normal resource state before remediation.
- After port hardening, check platform access and management-network connectivity.
- After Redis remediation, verify that the UI works normally and Redis requires a password.
Cause
The environment has both externally exposed service ports and unauthorized Redis access. Remediation must cover network access control and service-configuration hardening.
Resolution
- Preparation
- Risk level: medium.
- Check connection states of all resources.
- Disable global VM HA.
- Back up databases on both management nodes.
- Port-hardening procedure
- Upload
safe_script_4.6.xto the management node.
- Expected result: The hardening script environment is ready.
- Extract and run:
tar zxvf safe_script_v4.6
bash safe.sh
- Enter the management-node password.
- Expected result: The hardening menu opens.
- Select port restriction
3, then enter:
9091,2379
- Expected result: Target ports enter the rule configuration workflow.
- Allow required IPs.
- Press Enter to select the current management-node IP, but confirm the actual required allowed scope for the environment.
- Expected result: Normal traffic is not blocked accidentally.
- Remediate unauthorized Redis access
- Perform the following operations on both management nodes.
- Stop the UI:
zstack-ctl stop_ui
- Expected result: Redis and UI configuration can be changed safely.
- Back up Redis configuration:
cp /etc/redis.conf /etc/redis.conf_bak
- Expected result: A rollback file is retained.
- Modify
/etc/redis.confand set a strong password forrequirepass.
- Expected result: Redis no longer allows unauthorized access.
- Synchronize the Redis password on the UI side:
zstack-ctl config_ui --redis-password ZStackp@ssw0rd
- Expected result: The UI and Redis use the same new password.
- Start the UI:
zstack-ctl start_ui
- Expected result: The management platform resumes operation.
- Completion
- Check that all resource states are normal.
- Enable global VM HA.
- Expected result: The platform resumes normal operation.
Verification
- Platform access and management-network connectivity are normal.
9091and2379are controlled.- Redis configuration takes effect and unauthorized access fails.
- The UI service is normal.
Risks and rollback
- Risk: Incorrect port-hardening configuration can affect platform access.
- Risk: If the UI password is not synchronized after a Redis password change, the management platform can become abnormal.
- Risk level: medium.
- Rollback:
- Restore port hardening through the script rollback function.
- To roll back Redis, stop the UI, restore
/etc/redis.conf_bak, then start the UI.
