Washington (CNN) Iran dominated a Wednesday Senate committee hearing weighing more formal authorization of U.S. military action against ISIS, with GOP senators charging that the administration is strengthening Iran in Iraq even as it negotiates a flawed nuclear deal with Tehran.

Bob Corker, the Senate Foreign Relations Committee chairman, opened the hearing by warning that the U.S. is "making Iraq a better place for Iran." He pointed to the role Iranian forces and Iran-backed militias are playing in their fight against ISIS alongside Iraqi troops -- and not too far from separate U.S.-led operations.

Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff and one of three top national security officials testifying, said concerns about Iran's increasing role in the region were justified. But, using a different name for ISIS, he stressed that the "general consensus" among coalition forces is that "anything anyone does to counter ISIL is in the main (a) good outcome" and a "positive thing in military terms."

He added, though, "We are all concerned about what happens after the drums stop beating and ISIL is defeated."

The focus on Iran comes amid intensified sniping between the White House and Republicans over the Obama administration's negotiations with Iran to rein in Tehran's nuclear program and amid efforts on Capitol Hill to ensure Congress will get a chance to weigh in on any deal.

Sen. Marco Rubio, a Florida Republican considering a run for president, struck a combative tone as he challenged Secretary of State John Kerry, another witness, on whether the U.S. was holding back in its fight against ISIS in order to avoid hurting the fragile nuclear talks with Iran, which could feel threatened over a beefed up U.S. presence in the region.

Kerry swatted away the allegation, insisting it cut directly against the facts: Iran, he said, is glad the U.S. is fighting ISIS -- a common enemy for both countries.

"They would welcome our bombing of ISIS," Kerry said. "They want to us to destroy ISIS. They want to destroy ISIS."

Kerry also voiced frustration over Republican accusations that the deal in the works would allow the country to develop a nuclear weapon.

"It's really almost insulting," Kerry said of the Republican "presumption" that the White House would sanction a deal that would allow Iran to obtain a nuclear weapon.

"A whole lot of people are trying to give this a grade before the test is taken," Kerry said.

The committee's members also spent time grilling the national security officials on the hearing's stated topic: President Barack Obama's proposed AUMF, or authorization for the use of military force against ISIS. The resolution would formally authorize the nearly eight-month-old U.S. military effort against the militant group, replacing an earlier authorization constructed for the Iraq war.

The tough questions came from both sides of the aisle, with Republicans and some Democrats skeptical of the administration's proposed language. Republicans questioned whether the resolution was too limiting while Democrats, like Sen. Bob Menendez, the committees top Democrat, sought more specific, defined constraints on the President's authority to wage war against ISIS.

Notably, Menendez pressed the officials over the vague language forbidding "enduring offensive ground combat operations," questioning whether it might open the U.S. to a wider conflict.

"We all know that it may be the intent of someone not to have any large-scale, longterm offensive combat troops, but that intention can honestly change along the way," said Menendez, who voted against authorizing the Iraq War in 2002. "What I think Democrats are not willing to do is to give this or any other president an open-ended authorization for war."

Defense Secretary Ashton Carter, the third witness at the hearing, said the White House's authorization would not allow "the kind of campaign that we conducted in Iraq and Afghanistan."

But Sen. Rand Paul, a Kentucky Republican who is eying a presidential run, said he was also concerned that the language was too vague and open to interpretation.

"I trust the military when the military says this isn't what we're contemplating. I trust the military. The thing is there may be another president whom I may or may not trust," Paul said. "I have to deal with words that 15 years from now I have to explain to my kids and their friends and their kids kids that something I voted for in 2015 still has us at war at 2030 in 30 different countries."