James Comey famously refused to reauthorise an aspect of the NSA's warrantless surveillance efforts in 2004. Photograph: Evan Vucci/AP

James Comey's reputation for integrity in resisting a dubiously legal surveillance effort prompted President Barack Obama to tap the former deputy attorney general to run the FBI. But as Comey prepares for his Senate nomination hearing on Tuesday, some are looking for Comey to revisit his finest hour, following revelations that he didn't actually stop the surveillance.

When Comey testified before the Senate about it three years later, he became a Washington superstar. His story was "worthy of Dashiell Hammett", wrote the Washington Post's Dana Milbank. "Even the White House declined to counter Comey, who has a reputation for honesty."

That reputation is very likely to make Comey the first FBI director since 9/11 not named Robert Mueller. No prominent senator has publicly opposed the former federal prosecutor. Even before Comey's formal nomination, Patrick Leahy, the Vermont Democrat who chairs the Senate judiciary committee that will question Comey on Tuesday morning, said: "Mr Comey showed the kind of independence needed to lead the FBI when he stood up to those in the last administration who sought to violate the rule of law."

Yet questions persist about Comey and surveillance.

Leaks from Edward Snowden to the Guardian and the Washington Post have demonstrated for the first time precisely what Comey objected to: the NSA's bulk collection of internet data, such as email traffic and IP addresses, including from Americans. Yet after a three-month pause, the NSA and Justice Department found a new legal framework for collecting that same data, and the collection resumed in July 2004. Comey remained at the Justice Department for another year.

"The question should be focused on determining what exactly [Comey] opposed and why, and why he felt the adjustments made were sufficient to protect Americans' fourth amendment rights," said Mike German, a retired FBI official and lawyer with the American Civil Liberties Union. "Ongoing surveillance programs are something that Americans are quite concerned about, and whether the concerns he raised back in 2004 would exist with current programs as we know them" remain an open question.

That question speaks to the heart of Comey's appeal. Obama praised his "fierce independence and his deep integrity" when nominating Comey for the FBI job last month, especially Comey's willingness to "give up a job he loved rather than be part of something he felt was fundamentally wrong".

But if Comey was willing to approve what a secret NSA inspector general's report called "essentially … the same authority to collect bulk internet metadata that it had" under a new legal rubric, it calls into question how "fundamentally wrong" Comey considered the surveillance. With legislators actively challenging the administration on its bulk surveillance on Americans, Comey's testimony on Tuesday may indicate whether or not the administration plans on retaining or changing surveillance that Obama credits with preventing terrorist attacks.

Comey's testimony will extend beyond surveillance, but surveillance has helped reshape the FBI since 9/11. Under Mueller, who stood with Comey at Ashcroft's hospital bed, the FBI has transformed from a law enforcement organization to a law enforcement organization that once again practices domestic intelligence gathering. It falls to Comey to explain whether the FBI ought to continue in that role.

The ACLU is perhaps the most prominent private organization raising red flags about Comey and the FBI in general. Over the past several days, it has distributed a factsheet about what it considers the problematic aspects of the FBI's resurgent role in domestic intelligence, and raised questions about Comey's role during the Bush administration in indefinite detention and torture – questions that have gotten far less attention than Comey's stand at the hospital.

"The director must hew to the rule of law and accountability," the ACLU's German said. "These secret programs went on for so long that it was hard for members of Congress even to weigh in on the scope of what they became. Behind that curtain appears to be a lot of groupthink, and when exposed to the light of day, it's [yielded] public outrage."

Yet German did not diminish Comey's 2004 rebellion.

"I know how hard it is to stand up in an organization like the FBI and say, 'This is wrong.' I appreciate that he was able to do that in a situation that was incredibly difficult," German continued. "But it's what actually gets authorized that's a problem."

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.