In the US the FAA Flight Standards has the juristiction with the doors closed, as well as the FBI. (Federal Offence etc.)
On the ground with the doors open the FAA Security, if they are on the field, &/or local law enforcement has the duty.
FAA Inspectors can board a Foreign Registered airplane but cannot normally cause any delay to the flight.