By Augustine (who predates T.A. by a millenia) and Aquinas WWII and Afghanistan aka GW II were legitimate aka “just” when initiated.
It is questionable whether WWII remained so.
(In all humility as the son of a WWII veteran)
Germany declared war on America. Is self-defense achieved via joining the Allies in the European theater?