Once the employer has gone through the hassle of getting you a work permit, that means he really needs you. He can fire you at any time like any worker, first 3 months without notice, after that with 1 week notice or 2 week notice if you stay long enough but if you do a good job, you don't have to worry about it. Same way you can quit with the same notice he can fire you.
If you did get fired or quit, he can not cancel your work permit. You have until the expiry date of your work permit whether it was one or two years to find another job and get your work permit changed to the new employer. If you brought a spouse, your spouse will be on an open work permit and can take any job and can provide for you while you look for a new job and wait for your work permit to get changed.