Dogs understand rules, boundaries, and limitations as being the most important giveaway of who the leader is. Whoever sets and enforces boundaries for the packs own good is seen as the one in charge. They are constantly looking for where the boundaries are and who is reinforcing those boundaries. If you have a dog that follows all the rules you have set, they will still occasionally check to see that those rules still exist.
In my experience, the healthiest rule you can set up for your dog is for them to only receive affection when they earn it. This means that the dog must do as you ask before getting a reward. Every household is different and the set of rules that you may apply to one dog may be different in another household with another dog. This being true, I find that setting a boundary for the dog not to enter the kitchen, or sleep on the bed with the owners, or enter certain rooms uninvited are great boundaries to start with so that the dog becomes spatially aware and respectful.
Ideally, you want your dog to check in with you before going forward and entering a room, or greeting a person. This means that your dog is waiting for the green light from you. Still to this day, when I open any door to walk through, my dogs will look up at me before simply walking through. This tells me that they are looking to me first before making the decision on her own.
This is really vital in having a happy and healthy relationship with your dog because if they do not look to you before they decide their next move, then you are not seen as the decision-maker. Now, you may be thinking: why is important that my dog sees me as the decision-maker? Great question! It is important that your dog sees you as the decision-maker, because the decision-maker is seen as the pack leader. Unless you would rather have your dog tell you how you can greet your guests, I would recommend that you inform your dog of the proper way to maneuver around these boundaries.
The purpose of setting up boundaries around your household for your dog is to set them up for success. If your dog has no boundaries, rules, or limitations, they will presume the rights to do anything they want at any time that they want to do it. The danger with your dog doing whatever they feel like doing is that they will begin to enforce their own set of rules on their followers. Dogs are pack animals. They will either resort to being told what to do, or telling others what to do. There is no way around this.
At the end of the day, your dog does not really want to be in charge. They simply want a job to do and an owner to please. If they feel that they don't have either one, they will give you a job to do and have you please them instead. Which one would you prefer? I find that my clients would prefer to have their dogs listen to them than visa versa.