A holster...
Ok, enough with the obtuse answers.
Specifically, I'd bolt that to a stud and call it done. If someone knows it's there and really wants it, they'll get it. If they can't be deterred by the effort necessary to free it from a joist or stud, they probably won't care what pipe it's attached to. They will simply smash it. or destroy the lock with a drill.
You're question, essentially, is what do people who don't own a home yet and don't want to invest in a huge safe which they will eventually have to move do for security?
I'm in that position. I currently rent a house so I have lots of space but no desire to haul a safe across the town, state, or country.
Long Guns: All but one of my long guns live in secured rifle cases (storm cases) with twin padlocks on the outside. The cases are then locked using a cable lock through an anchor I set in the wall stud. The door to the closet in also locked and all three sides of the closet are external facing, second floor walls. The odd bird is a Mosin which probably wouldn't even fit in a safe. That gets a trigger lock and it's still looking for a new permanent home.
Pistols: All but one get a trigger lock and then a hard case with an external lock before being locked in the closet described above. The remaining is whatever I am using for a carry piece at the time. Generally it's a Sig 229(40) which starts out the day secured at my bedside making the transition to my holster/person before leaving the house. At the end of the day it comes home and is secured in the same position it started the day before anything else happens. Occasionally, if I am going out again, I will leave it on my waist. While I do not share my space in a permanent manner with anyone except the dog, I am trying to teach myself to be flawless about securing unattended firearms now, so that it's really second nature when it counts.
One other thing. I won't disclose how I secure the pistol bedside except to say that it is in compliance with the relevant MA regulations concerning the proper storage of firearms etc etc....)
Ammo is stored in ammo boxes with hasp/lock combinations that I got from Cheaper than dirt. The locked boxes then go in the closet. I always keep three magazines in play. One in the pistol, and two in a holder.
A lot of people seem to like the stack on safes. That's what I will investigate next.
RD