It's not even premature. That security law was always planned in the Basic Law, but failed to be implemented, and the previous Chinese government under the more centrist Hu Jintao let it go (that was probably also because then, Hong Kong was an important part of the Chinese economy, which is not the case anymore).
This was decided in 1990, in accordance with the China-UK agreement of 1984. So the UK and others acting all surprised now is just that, an act.
"Critics say the introduction of the law this way amounts to a breach of the "one country, two systems" principle, which is so important to Hong Kong - but clearly it is technically possible to do this."