It is a defense to any action brought pursuant to this chapter that the person who possessed, distributed, or facilitated the marketing or distribution of a dangerous or harmful drug did so under authority of law as a practitioner, as an ultimate user of the drug pursuant to a lawful prescription, or as a person otherwise authorized by law.
A law enforcement officer or agency, the State, or a person acting at the direction of a law enforcement officer or agency or the State is not liable for participating in the illegal drug market if the participation is in furtherance of an official investigation.
HRS § 663E-10