In general terms, the Constitutional power for the federal government, and not the states, to control immigration policies and laws comes from interpretations of Article 1, Section 8, Clauses 3 and 4, of the Constitution.
I'm not taking a position that political refugees have the same constitutional right to entry as an American citizen has for gun ownership; but I do applaud the logic of the argument that Jon made regarding the idea of one terrorist slipping through being 'not worth it'.
I doubt that any committed terrorist would choose refugee status as a way to enter this country. There are many already here, and there are easier ways to get here. To think that by denying entry to these people we can prevent even one terrorist act is a stretch. To think that it would have any significant impact on the terrorist threat is stretching cubed.