The intelligence community's top lawyer on Tuesday defended the surveillance violations by staff of the National Security Agency by comparing programs that collect mass amounts of information on Americans to problems with the troubled health care website.