Non Proliferation Treaty which Ukraine signed.  You have to be allowed by the UN Security Council (UNSC) to own nuclear weapons. UNSC has five permanent members, United States, Russia, China, France and United Kingdom.