As all of Washington braces for James Comey's incendiary testimony before Congress Thursday, it's worth a trip down memory lane to reflect on his tenure as FBI director.

When Comey was appointed by Barack Obama to lead the FBI in 2013, he was seen as a hero in many circles for dramatically pushing back against the Bush administration's illegal surveillance programs.

"Jim understands that in time of crisis, we aren't judged solely by how many plots we disrupt or how many criminals we bring to justice," Obama said as he nominated Comey in 2013. "We're also judged by our commitment to the Constitution that we've sworn to defend, and to the values and civil liberties that we've pledged to protect."

Yet as Reason's Nick Gillespie wrote shortly after Comey's nomination, "Comey has been applauded for standing up to some of Bush's more-expansive surveillance policies, but he also defended indefinite detention without a trial, waterboarding, and—once a new legal rationale had been hammered out—those more-expansive surveillance policies."

During his confirmation hearing to replace then-FBI Director Robert Mueller—who, because time is a flat circle, is now the special counsel leading the investigation into the Trump campaign's ties to Russia—Comey assured senators and the public that there were plenty of checks and safeguards against FBI overreach, such as the FISA court, investigative guidelines from the attorney general, and oversight from Congress and the inspector general. "I think folks don't understand that the FBI operates under a wide variety of constraints," Comey argued.

But as all good civil libertarians know, the FBI has always been an intensely political agency that is almost never restrained from using its vast powers to address the anxieties and paranoias of the people in power. (See: the redbaiting of the '50s, the efforts to blackmail and discredit civil rights leaders in the '60s, and the infiltration of dissident political groups both before and after 9/11.) Congress, meanwhile, is deferential to the point of uselessness when it comes to delegating power to the intelligence community.

It was about six months after Comey's appointment that Edward Snowden leaked evidence that the National Security Agency was vacuuming up massive amounts of U.S. citizens' phone data. Comey said he was "confused" by the public perception of Snowden as a whistleblower—hero, even—since all three branches of government had approved the surveillance dragnet.

"I see the government operating the way the founders intended," Comey declared. "So I have trouble applying the whistleblower label to someone who basically disagrees with the way our government is structured and operates."

As Reason's Scott Shackford wrote in 2014:

Even before Edward Snowden began leaking classified documents showing exactly how humongous federal data collection had become, there were already a number of previous examples of government snooping out of control. In particular, the FBI's system of using National Security Letters (NSLs) to obtain personal records without a court order was found by the Department of Justice's inspector general to have been terribly abused, gathering records with little oversight or reason, not following processes and resorting to "exigent letters" to even bypass the NSL rules entirely by claiming emergencies.

Similarly, when Apple and Google announced in 2014 they were making encryption easier for consumers, Comey knew who the real victim was: the government. "What concerns me about this is companies marketing something expressly to allow people to hold themselves beyond the law," Comey told reporters. Over his tenure, Comey would repeatedly testify about the dangers of allowing U.S. citizens to keep their communications hidden from the government's prying eyes.

Comey put muscle behind that rhetoric in 2016 when the FBI attempted to force Apple to create a backdoor into the locked iPhone of the San Bernardino terrorist Syed Farook.

Then there was Project Exile, one of Comey's favorite ideas. Under the banner of reducing gun violence, Project Exile encouraged local police to refer firearm cases to federal prosecutors, who could pursue five-year mandatory minimum sentences. The program, which was embraced by law enforcement groups, essentially federalized local gun crime and resulted in convicted defendants being shipped hundreds of miles away to federal prisons. Exiled, in other words. The program is now being enthusiastically embraced by Attorney General Jeff Sessions and President Trump.

Yet Congress didn't have have serious credibility concerns with Comey until the 2016 presidential election, when the FBI had to juggle investigations into Hillary Clinton's private email server, Donald Trump's alleged links to Russia, and the Kremlin's thinly disguised efforts to undermine U.S. elections.

When Comey came into the FBI director's office, we were told he'd leave the unconstitutional excesses of the Bush years behind. Now he has been unceremoniously ousted, and the Senate is once again talking about the crucial need to appoint an independent and trustworthy FBI chief, free from political influence. The next director will no doubt tell senators what they want to hear. Whether they actually attempt to hold him to those words is up to them.