This is what I have:
http://safetycentral.com/cysespbysamo.html
It has a velcro band that goes around my top bar rather well, but it could go other places I’m sure. There is a tight velcro band around the bottle, then velcro pieces stick the bands together. So it’s an easy grab for the bottle to have it ready to fire. I even have it with me when I ride the Metro or Metrobus, though I usually tuck it in my pocket.
There are various laws surrounding even mace. Specifically for Montgomery County, MD (and a few other counties, but not all) you can carry as a reasonable precaution against apprehended danger. I guess they wanted a specific law making it illegal to use mace while committing a crime, so now even just carrying it is not legal unless you can convey that you’re justified in carrying it. Though I’ve never been even questioned about it, my reasoning is that I’ve been chased by dogs while cycling before, so that’s why I carry it, officer. If you’re female and cycling on the trails in the evenings, I’m sure it would be even easier to convey your fear of apprehended danger.
You can see it in this picture, right in front of my seatpost, so I can grab it easily and quickly.

26AUG12 004 by certifried, on Flickr
there was a story last year in MoCo about a woman who used mace to fend off an attacker.