The other top candidate for the State job is Sen. John Kerry of Massachusetts, who is expected to be confirmed easily by his chamber colleagues. His departure from the Senate, though, could potentially cost Obama's party a seat by creating an opening for the man who just lost the other Senate seat, Scott Brown.
The idea of Kerry as defense secretary, which has also been floated, is not one that he has expressed an interest in, according to people close to him.
For Obama, the post-election period was intended to focus on starting to enact the economic agenda at the core of his re-election bid. He and Congress are in the hunt for elusive compromise before Jan. 1 if they are to avoid a huge package of tax increases and spending cuts that could derail the economic recovery.
Obama is, in fact, pursuing that course. But a story involving sex, resignations, national security and congressional oversight has a way of grabbing attention.
Carney, the president's spokesman, characterized the cases of Petraeus and Allen as individual matters that reflected no broader theme or challenge.
"I really would ask you to not extrapolate broadly," Carney told reporters. "The president has great confidence in the military, great confidence in his commanders, and will continue to have that confidence."
That expression of confidence extends to Allen, which is significant given the state of America's longest war. Allen is due soon to give Panetta a recommendation on the pace of U.S. troop withdrawals in 2013; about 68,000 U.S. troops are still serving in a war that is on pace to continue until the end of 2014.
How long Panetta himself will lead the defense agency is yet another unknown for Obama. The Pentagon chief Panetta recently has indicated a willingness to stay on for at least some of Obama's second-term.
When asked whether he would rule out staying for all of Obama's second term, Panetta said: "Who the hell knows?"
Associated Press writers Donna Cassata, Julie Pace and Bradley Klapper contributed to this story.
Follow Ben Feller at www.twitter.com/BenFellerDC
Cut pounds of stomach fat every week by using this 1 weird old tip.