First of all, we can't be sure they are Starfleet personnel. The uniforms are quite different. I think it is more likely they are civilians employed by Starfleet, just as the US Deprtment of Defense employs non-military police and security personnel for its facilites.
That was my impression. That they were civilian law enforcement. The man who arrested McCoy said he was "Federation Security" which always made me think it was the UFP version of the CIA or FBI.