The president is probably exercising statutory authority of some kind. But this is a dumb idea that will raise the price of lumber, furniture, and milk for no good reason. I assume this is a gambit to renegotiate NAFTA. As far as I know I don't think we ever had a problem with trade with Canada.
Softwood lumber is a very old dispute, and Canadian dairy is very protectionist, although an argument could be made that there's a lot of subsidies and/or protectionism in most countries' food/agriculture industries. You can still be friends while having serious disputes.
It would be preferable from a policy standpoint to simply end subsidies on both sides.