CCC 2310 Public authorities, in this case, have the right and duty to impose on citizens the obligations necessary for national defense.
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.1

1 Cf. GS 79 # 5.