You might not use this to build a gun safe, but here B-Star Crafts demonstrates the simple technique of using magnets to provide low-level cabinet and drawer security:
While the techniques are basic, the video seems to have scratched many an itch; at press time it had 13 million views and counting.