Easily done once one has read and studied the docs, and coming to an internal decision that they want to uphold the Constitution of the United States. Then after being sworn in, take upon themselves the obligation imposed by swearing an oath to Support and Defend said Constitution.
I see absolutely NO REQUIREMENT restricting one not a citizen of the US to take such an oath. Nor do I seem any mandate invalidating such as oath!
Perhaps you're not looking in the right place. Perhaps you should thoroughly re-read our founding document which begins with the following preamble:
"We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America."
Perhaps you might realize that when our Founding Fathers referred to "the people of the United States" they were not referring to everyone in the United States, but to the citizens of the United States.
Perhaps you will then recognize that the term "the people" is only mentioned twice, once in the preamble, and once with respect to electing Congressional Representatives (before another amendment gave people the right to elect senators directly).
While you're at it, please remember our Constitution is "the supreme Law of the Land," under which all other federal, state, and local law must conform, and that the Constitution itself and the 9th and 10th amendments specifically limit and define both federal and state authority.
Therein, you might realize that until immigrants become naturalized citizens, they were never meant to be eligible to either partake in any election process, much less hold public office in these United States.
If states have let them do so anyway, they're not following the Constitution. If you believe that's "OK," then you're not tracking.