Beijing says the new rules, which could also apply to foreign and Taiwanese nationals, are aimed at safeguarding "national security."