At a Port of Entry they are not in Canada so the Safe Third Country Agreement designating the USA applies.

Once in legally or illegally then under the IRPA implementing our international refugee protection obligations, the claim to refugee status must be assessed and the Charter of Rights and Freedoms applies.  This was confirmed by the Supreme Court of Canada over three decades ago.- Singh v. Minister of Employment and Immigration, [1985] 1 S.C.R. 177.

Per Dickson C.J. and Lamer and Wilson JJ.: Appellants, in the determination of their claims, are entitled to assert the protection of s. 7  of the Charter  which guarantees "everyone ... the right to life, liberty and security of the person and the right not to be deprived thereof except in accordance with the principles of fundamental justice". The term "everyone" in s. 7  includes every person physically present in Canada and by virtue of such presence amenable to Canadian law.