US military bases are under the jurisdiction of the US and are “US soil”.
In college we were taught that American derive their citizenship 1 of 2 ways - by the law of the soil or the law of the blood. Children born on American soil are American citizens (that’s why a lot of illegals want to have their children here) and children born of at least 1 American parent are citizens.
John McCain was born in a public hospital in the city of Colon, the Republic of Panama.