For medical use only, it is already legal at the federal level. The generic name is Dronabinol. It is marketed as Marinol and Syndros.
Demanding brownies and joints for "medical use" is just straight up dishonest. You'll notice that drugs for legitimate medical use are not supplied in either way. (oh, it's time to eat a glaucoma prevention brownie...)