In Chew v. Colding (1953), the Court ruled that those who have successfully entered the country are protected by First Amendment rights to free speech, Fourth Amendment protections against unreasonable searches and seizures, and Fourteenth Amendment guarantees of equal protection of the law. Outside of the United States, however, these protections do not apply.
The question in the recent was whether Camp X-Ray at Gitmo was part of the US. The Court said it was.