The suit claims that SpaceX violated federal law by requiring applicants to be U.S. citizens or permanent residents.