Amid mounting criticism of Secretary of State John Kerry and CIA Director John Brennan, President Barack Obama used an impromptu session with reporters on Friday to make it clear both were staying where they are.

"Let me take this opportunity, by the way, to give Secretary John Kerry credit," Obama told reporters at the White House after making a statement criticizing House Republicans for not acting on immigration measures.

"He has been persistent. He has worked very hard. He has endured on many occasions really unfair criticism simply to try to get to the point where the killing stops and the underlying issues about Israel's security, but also the concerns of Palestinians in Gaza, can be addressed."

The president's spirited defense of his secretary of state came after the collapse of the cease-fire between Israel and Hamas prompted harsh criticism of Kerry and even calls for his resignation.

Appearing on Newsmax TV on Wednesday, House Veterans Affairs Committee Chairman Jeff Miller, R-Fla., said he thought Kerry should resign. Texas Republican Sen. Ted Cruz has also joined the "Kerry Must Go" chorus, and the secretary of state has been in for strong language from the Israeli press.

Obama seemed aware of this criticism and sent a strong signal that the 2004 Democratic presidential nominee, who backed him at a critical point in his own race for the nomination against Hillary Clinton in 2008, wasn't going anywhere.

Later in the news session, Obama told reporters: "When I see John Kerry out there trying to do something, I think we should be helping him."

For nearly two days, Brennan has also been under fire amid revelations that the CIA improperly searched computers of U.S. senators who were involved in a probe of the agency's "enhanced interrogation techniques" of alleged terrorists. Brennan promptly apologized as calls for him to resign were heard on Capitol Hill on Thursday.

Sen. Kelly Ayotte, a New Hampshire Republican who sits on the Senate Armed Services Committee, told Bloomberg, "It could be an issue of constitutional proportions."

Sen. Mark Udall, a Colorado Democrat on the Senate Intelligence Committee, said in a statement that Brennan has failed to deliver on promises to change the CIA’s culture and respect "vigorous and independent congressional oversight," Bloomberg reported.

"From the unprecedented hacking of congressional staff computers and continued leaks undermining the Senate Intelligence Committee’s investigation of the CIA’s detention and interrogation program to his abject failure to acknowledge any wrongdoing by the agency, I have lost confidence in John Brennan," Udall said.

But the president would have none of it.

"I have full confidence in John Brennan," he told reporters, adding that the intelligence chief apologized to Sen. Dianne Feinstein, chairwoman of the intelligence committee, and was the first to call for the Inspector General's report that revealed the search of Senate computers.

John Gizzi is chief political columnist and White House correspondent for Newsmax.