Even a single meter of water is enough to protect against the bulk of the damage from all common radiation in interplanetary space except perhaps the most powerful and infrequent of solar flares.
I don't know where you get the idea that it takes an entire planet to protect you from solar flares or cosmic rays, that's very wrong, solar flares are not that penetrating. In fact, on Earth almost all particle radiation from solar flares (and from cosmic rays) is stopped by the upper atmosphere.
A simple atmosphere will protect you from flares. I think even Mars's very thin atmosphere would be enough to save you.
I brought up a planet only for the fact that you would need something really really big to block all cosmic rays. I did not mean to imply it was necessary. People on Earth are hit from cosmic rays from "above" as part of our background radiation.
Atmospheres help but only somewhat. The radiation exposure on Mars' surface is still much, much higher than on the surface of Earth, enough to warrant taking extra precautions to lessen exposure (such as placing regolith filled sand bags on top of habitats).
Also, to be precise people aren't hit by primary cosmic rays on Earth but by secondary cosmic rays, the particle debris from high energy protons and nuclei colliding with atoms in the upper atmosphere.
I wasn't referring specifically to solar flares either, I've made an edit to make that more clear. It's simply flat out wrong to state that ordinary cosmic rays that are dangerous to human beings penetrate through planet sized masses of matter. The only thing that does so is neutrinos and the only way you're going to get sufficient neutrino flux to be hazardous is if you're very close to a type-II supernova, which is an extraordinarily exceptional event.
Just wanted to point out he was talking about cosmic rays with the planet comment. And added the ;) to try and not be a dick about it. Not sure how that worked out.
I don't know where you get the idea that it takes an entire planet to protect you from solar flares or cosmic rays, that's very wrong, solar flares are not that penetrating. In fact, on Earth almost all particle radiation from solar flares (and from cosmic rays) is stopped by the upper atmosphere.
Edit: added additional clarification.