Abstract:This paper proposes a novel optimization framework for enhancing the security resilience of cell-free massive multiple-input multiple-output (CF-mMIMO) networks with multi-antenna access points (APs) and protective partial zero-forcing (PPZF) under active eavesdropping. Based on the main principles of absorption, adaptation, and recovery, we formulate a security-aware resilience metric to quantify the system performance during and after a security outage. A multi-user service priority-aware power allocation problem is formulated to minimize the mean squared error (MSE) between real-time and desired security efficiency, thereby enabling a trade-off between the target user's secrecy performance and multi-user quality of service (QoS). To solve this non-convex problem, a security-aware iterative algorithm based on the successive convex approximation (SCA) is employed. The proposed algorithm determines the optimal power allocation strategy by balancing solution quality against recovery time. At each iteration, it evaluates the overall resilience score and selects the strategy that achieves the highest value. Simulation results confirm that the proposed framework significantly improves the resilience of CF-mMIMO networks, allowing flexible adaptation between rapid recovery and high-quality recovery, depending on system requirements.