The incident on Friday thrust security and the terror threat back into the limelight three months before elections in France, with authorities saying it was a “terrorist” assault.