Canada has tax treaties to facilitate cross border activity. These tax treaties typically maintain that a foreign entity (covered by treaty) will not be taxable under the treaty if they do not have a permanent establishment.
There are complications in the case of current e-commerce/cloud practices where there is business being conducted but there is no physical presence. Current discussions on this topic conclude that a website that markets and sells into Canada, but their servers are outside of Canada, are unlikely to be deemed as having a permanent establishment in Canada.