Canada is waking up to a harsher security order in which its closest ally is both indispensable and increasingly unpredictable.