For the past 3 years I worked on a complex which was part of, and owned by, a major international airport, but leased to the state and federal government. It was separate from the commercial terminal, so I didn't run afoul of that prohibition, but there wasn't really any delineation between the federal and state portions of the complex, and over the course of the day I ended up all over the place.
Also, if any ne'er-do-wells knew what agencies and units were based from that complex it would be a major target.
The primary aspect of my job was something similar to hso's but if I ever had to actually DO my job this country would be seriously screwed.
A secondary aspect of my job was security of the complex, and I ended up being the primary person who allowed visitors access and escorted them around the complex, but I was not authorized to be armed. There were some folks who worked near the backside of the base who habitually went armed, but they did not have any responsibility for security or escort... makes sense right?
Airport police technically were the primary security, but they never came to our side of the airport.
Anyway, I ended up not carrying on my person, but I would have a firearm in the vehicle I used when working the gate and escorting visitors. I am still not sure of the legality of that, I am pretty sure I was in the clear as I generally did not go into buildings directly owned or operated by the federal government. I also wasn't the only member of my element that did the same thing. I'm pretty sure my bosses wouldn't have cared, I'm pretty sure one of them also kept a gun in his car, but if any of the federal employees knew I was armed it could have caused some trouble.
Its all a moot point now as my orders ran out, the unit I worked for moved, and I decided to move on to other things. However, it was a good example of a job that was too dangerous to carry if I was worried about job security, but I felt it was also too dangerous not to carry if I was worried about personal and base security.