As @Jan pointed out it is a legal action to apply for asylum in Canada when you are on transit.
Concerning your second question:
"You can apply for refugee status at any port of entry. This means an airport, seaport or land border.
The officer you make your refugee claim to will decide if your claim is eligible to be referred to the Immigration and Refugee Board (IRB).
If your claim is eligible you will:
- be given a date for your IRB hearing
- and have 15 days to complete all forms in the application package and submit them to the IRB."
For further information of the asylum proceeding see this link:
Unfortunately I could not find information concerning your third and fourth question. Maybe other members of the community can provide them.
I hope this answer is helpful to you. Feel free to ask further questions if anything remained unclear.
In addition I will link our lawyers @Marcel and @Steven that share their expertise here on the platform. Maybe they can add some information to the given answers.