The authority, exactly
The Estonian Unemployment Insurance Fund carries out the labour-market check the employer needs before applying; the Police and Border Guard Board decides the residence permit itself. If you are abroad, expect to apply for the long-stay visa you travel on at the Estonian mission responsible for your place of residence first.