  The second law of thermodynamics states that work cannot be extracted from
thermal equilibrium, whose quantum formulation is known as complete passivity;
A state is called completely passive if work cannot be extracted from any
number of copies of the state by any unitary operations. It has been
established that a quantum state is completely passive if and only if it is a
Gibbs ensemble. In physically plausible setups, however, the class of possible
operations is often restricted by fundamental constraints such as symmetries
imposed on the system. In the present work, we investigate the concept of
complete passivity under symmetry constraints. Specifically, we prove that a
quantum state is completely passive under a symmetry constraint described by a
connected compact Lie group, if and only if it is a generalized Gibbs ensemble
(GGE) including conserved charges associated with the symmetry. Remarkably, our
result applies to non-commutative symmetry such as $SU(2)$ symmetry, suggesting
an unconventional extension of the notion of GGE. Furthermore, we consider the
setup where a quantum work storage is explicitly included, and prove that the
characterization of complete passivity remains unchanged. Our result extends
the notion of thermal equilibrium to systems protected by symmetries, and would
lead to flexible design principles of quantum heat engines and batteries.
Moreover, our approach serves as a foundation of the resource theory of
thermodynamics in the presence of symmetries.
