10 U.S.C. § 504 : US Code - Section 504: Persons not qualified

      (a) Insanity, Desertion, Felons, Etc. - No person who is insane,
    intoxicated, or a deserter from an armed force, or who has been
    convicted of a felony, may be enlisted in any armed force. However,
    the Secretary concerned may authorize exceptions, in meritorious
    cases, for the enlistment of deserters and persons convicted of
    felonies.
      (b) Citizenship or Residency. - (1) A person may be enlisted in
    any armed force only if the person is one of the following:
        (A) A national of the United States, as defined in section
      101(a)(22) of the Immigration and Nationality Act (8 U.S.C.
      1101(a)(22)).
        (B) An alien who is lawfully admitted for permanent residence,
      as defined in section 101(a)(20) of the Immigration and
      Nationality Act (8 U.S.C. 1101(a)(20)).
        (C) A person described in section 341 of one of the following
      compacts:
          (i) The Compact of Free Association between the Federated
        States of Micronesia and the United States (section 201(a) of
        Public Law 108-188 (117 Stat. 2784; 48 U.S.C. 1921 note)).
          (ii) The Compact of Free Association between the Republic of
        the Marshall Islands and the United States (section 201(b) of
        Public Law 108-188 (117 Stat. 2823; 48 U.S.C. 1921 note)).
          (iii) The Compact of Free Association between Palau and the
        United States (section 201 of Public Law 99-658 (100 Stat.
        3678; 48 U.S.C. 1931 note)).

      (2) Notwithstanding paragraph (1), the Secretary concerned may
    authorize the enlistment of a person not described in paragraph (1)
    if the Secretary determines that such enlistment is vital to the
    national interest.