Russian forces engaged with and captured Ukrainian patrol vessels in the Black Sea as they approached the Strait of Kerch. As you can see below, in an agreement between Russia and Ukraine dating to 2003, the Strait of Kerch and Sea of Azov are jointly navigable waterways. The fourth statement clearly intimates that military vessels of both Russia and Ukraine have right of navigation of the strait and the sea.
Agreement between the Russian Federation and the Ukraine on cooperation in the use of the sea of Azov and the strait of Kerch Dec 24, 2003
The Parties, proceeding from the necessity of conservation of the Azov-Kerch defined area of water as integral economic and natural complex, to be used in the interests of the Russian Federation and the Ukraine, have agreed as follows: 1) The sea of Azov and the strait of Kerch are historically internal waters of the Russian Federation and the Ukraine. 2) The sea of Azov must be delimited by the state border in accordance with the Agreement signed by the Parties. 3) Dispute settlement regarding the issues pertaining to the defined area of water of Kerch must be regulated by agreement between the Parties. 4) Mercantile vessels and other state non-commercial vessels flying the flags of the Russian Federation and the Ukraine have free navigation in the sea of Azov and the strait of Kerch. 5) Russian-Ukrainian cooperation in the spheres of navigation, fisheries, protection of marine environment, ecological safety and life-saving in the sea of Azov and the strait of Kerch must be implemented on the basis of existing international agreements and by conclusion, in respective cases, of the new ones.
This morning I read here that Putin claims the attack was staged by Ukraine. I also read the following statement here. Note that this statement is dated April 2018.