Legitimate defense can be not only a right but a grave duty for one who is responsible for the lives of others. The defense of the common good requires that an unjust aggressor be rendered unable to cause harm. For this reason, those who legitimately hold authority also have the right to use arms to repel aggressors against the civil community entrusted to their responsibility (Catechism 2265).
Those who are sworn to serve their country in the armed forces are servants of the security and freedom of nations. If they carry out their duty honorably, they truly contribute to the common good of the nation and the maintenance of peace (Catechism 2310).