From the Royal Canadian Navy’s website:
Canadian Naval Ensign
The Naval Ensign is flown at the masthead while at sea, or at the stern when alongside, moored or at anchor.
Canadian Naval Jack
The Naval Jack is flown at the bow when alongside, moored or at anchor.
Commissioning Pennant
Flown from the masthead, the Commissioning Pennant is hoisted on the day a warship is commissioned and is displaced only by the personal flag of the Sovereign or senior officer when embarked.