Pretty much so. I worked in some secure facilities while in the Army. If you weren't on the access roster, you weren't getting into the building no matter how many stars you had on your collar. Period.
I'm not questioning that. I'm questioning the guards' attitudes after they allowed Kirk and Sulu to enter the area. If they felt either officer's being there was inappropriate, they should have asked them to leave. Name-calling and grand-standing wasn't necessary, though it doesn't surprise me that a couple of uneducated grunts with ugly uniforms and stupid hats wouldn't understand that.
If the best you can come up with is, "Don't get smart, Tiny," you're probably not that bright to begin with.