WASHINGTON – Former FBI director James Comey claimed Wednesday that Attorney General William Barr and outgoing Deputy Attorney General Rod Rosenstein lack the "inner strength" to stand up against Donald Trump, adding that he believes the president "eats your soul in small bites."

In a New York Times op-ed published Wednesday, the same day Barr is testifying on Capitol Hill for how he handled special counsel Robert Mueller's report of the Russia probe, Comey lays out how people in Trump's administration become "complicit" in the president's actions.

The former FBI director, who was fired by Trump nearly two years ago, praised Jim Mattis for resigning to stay true to his principals. The former Defense Secretary resigned after Trump announced he was going to pull troops from Syria. In his resignation letter, Mattis wrote that he was stepping down "because you have the right to have a secretary of defense whose views are better aligned" with Trump's own.

More:Attorney General Barr defends release, conclusions of special counsel's Russia report

"Amoral leaders have a way of revealing the character of those around them. Sometimes what they reveal is inspiring," Comey wrote of Mattis resignation.

However, Comey also added that "more often, proximity to an amoral leader reveals something depressing."

"Accomplished people lacking inner strength can’t resist the compromises necessary to survive Mr. Trump and that adds up to something they will never recover from," Comey wrote. "It takes character like Mr. Mattis’s to avoid the damage, because Mr. Trump eats your soul in small bites."

Comey in the op-ed criticized Rosenstein for his resignation letter, where he thanked Trump for "the courtesy and humor you often display in our personal conversations," despite the fact the president often disparaged the Department of Justice and Rosenstein.

He also went after Barr for his recent actions echoing Trump by saying there was “no collusion” and claiming the FBI of “spying.”

Barr has defended how he handled Mueller's probe into whether Russia colluded with Trump's campaign, which also widened to include possible obstruction of justice, despite a rare statement from Mueller on the eve of the attorney general's Capitol Hill hearing disputing Barr's characterization of the obstruction of justice portion of the report.

More:Mueller: Barr's summary of report did not capture 'context, nature, and substance' of Russia probe

Comey's op-ed is not the first time he has called out Trump's desire to have complete loyalty.

In his book "A Higher Loyalty: Truth, Lies, and Leadership,” Comey has characterized the president as a mob boss and described Trump as creating a "cocoon of alternative reality that he was busily wrapping around all of us."

"His leadership is transactional, ego driven and about personal loyalty," Comey penned of the president in his book.

However, in Wednesday's op-ed, Comey warned that once those around the president begin "sitting silent while [Trump] lies," and start believing you are "you are too important for this nation to lose," that is when have lost your way.

"Of course, to stay, you must be seen as on his team, so you make further compromises. You use his language, praise his leadership, tout his commitment to values," Comey wrote.

"And then you are lost. He has eaten your soul," he concluded.

Contributing: Christal Hayes, Kevin Johnson, Kristine Phillips, Bart Jansen