Even though his planned successor has yet to receive Senate confirmation, Defense Secretary Leon Panetta was given his ceremonial goodbye on Friday with President Barack Obama and other political and military leaders in attendance.

Generally held on the sprawling outdoor grounds of the Pentagon, rainy weather pushed the ceremony next door to the Joint Base Ft. Myer-Henderson Hall in Virginia.

Panetta has not had an easy go of it in his final months in office.

He faced some level of criticism over Washington's response to the deadly Benghazi terror attack, the rise of Islamic extremists in Mali, and the gas plant siege by militants in Algeria, where Americans were among numerous hostages.

Most of the event, naturally, touched on Panetta's selfless dedication over 50 years in public service.

"Bravo was in all of the meetings when we planned the [Osama] bin Laden operation and he also sat in on many of the sensitive meetings and the discussions I had at the Pentagon," Panetta said of his dog.

"I want you to know that he has never told a soul what he heard. He is definitely not a leaker - at least according to the definition of the word," Panetta cracked in a sly reference to the anger of his predecessor, Robert Gates, over Obama administration openness about the top secret raid that killed the al Qaeda leader in 2011.

Joint Chiefs Chairman Martin Dempsey pointed out Panetta's long career in public service as well as his love of red wine.

"It's clear that Secretary Panetta has mastered the balance of service and self. Last week on 'Meet the Press,' NBC's Chuck Todd played a clip of you from 1989, and you've barely changed," Dempsey said.

"I'm sure that your Mediterranean diet has helped. The olive oil for your skin, the garlic for your heart, and the red wine for pretty much everything else."

Panetta also recounted his time as head of the CIA and the Pentagon, and struck a serious chord with a message to would-be U.S. attackers.

"We've kept pressure on al-Qaeda, and we're going after extremists wherever they may hide, and we have shown the world that nobody attacks the United States of America and gets away with it," he said.

He also sent a message to politicians, including Obama, about working together to avoid massive spending cuts that officials say would hit the Pentagon particularly hard.

"This is a time of uncertainty, but my career in public service gives me hope that the leaders of this nation will come together to resolve the challenges facing this country and to seize the opportunities of the 21st century," Panetta said.

Obama also pushed a similar message in his speech, using the time to thank Panetta, but warning Congress about the budget cuts due to take effect on March 1 without congressional action to avert them.

"There is no reason for that to happen. Putting our fiscal house in order calls for a balanced approach, not massive indiscriminate cuts that could have a severe impact on our military preparedness," Obama said.

The military faces up to $50 billion in annual spending cuts over the next 10 years under the congressional process called sequestration.

While the president looks for answers to averting those cuts for the Pentagon and other federal agencies, he is also waiting for the Senate to approve Panetta's nominated successor, former Sen. Chuck Hagel.

Panetta has not announced when his final day will be at the Pentagon, but it is expected to be late next week. That's when Hagel's nomination is expected to start moving through the Senate.