Since first winning election in 2008, President Obama has prioritized a successful resolution to the issue of Iran's nuclear program, an achievement that would go a long way in defining his foreign policy legacy.

But what exactly constitutes success? And what would a successful long-term pact with Iran look like?

This week, the P5+1 global powers reached a landmark interim deal to freeze much of Iran's nuclear enrichment in exchange for about $7 billion in sanctions relief. The mere fact that the two sides reached a deal that will hinder Iran's nuclear ambitions was in itself a "diplomatic success story," wrote the Washington Post's Eugene Robinson, because without it, "we would likely be drifting toward war."

"Even if negotiations for a permanent agreement ultimately fail," Robinson wrote, "this is a bargain price for six months of peace — six months, mind you, during which the Iranian nuclear program goes backward, not forward."

Still, as Obama himself noted, this is merely "a first step toward a comprehensive solution." And he reaffirmed that Iran "must accept strict limitations on its nuclear program that make it impossible to develop a nuclear weapon," as part of a long-term deal.

The administration's main goal is preventing Iran from having the capacity to build a nuclear bomb — period. But to achieve that end, there is a disagreement over whether the international community must force Iran to completely abandon its enrichment capabilities, as the likes of Israel and some members of Congress have demanded.

Whether Iran has a "right" to peaceful enrichment has been a major sticking point in past negotiations. Iran vigorously contends that it must be allowed to enrich its own material since other nations are allowed to do the same for peaceful purposes, an argument it revived following the interim deal.

The U.S. appears willing to "agree to disagree" on this issue, as the New York Times put it, essentially disputing Iran's claim in public but allowing it to nevertheless enrich low-grade uranium for civilian energy purposes. The interim deal specifically notes that a comprehensive solution would include "a mutually defined enrichment program with practical limits and transparency measures to ensure the peaceful nature of the program."

What parameters the U.S. would place on that enrichment program remain undefined. However, they would need to significantly lengthen the "breakout time" necessary for Iran to build a bomb, something that could be achieved by limiting the number and quality of Iran's centrifuges.

David Albright, head of the Institute for Science and International Security, has argued that Iran's breakout time must be upped to six months for a final deal to be "credible and justify significant sanctions relief." To achieve that goal, Iran would have to reduce its number of centrifuges to between 5,000 and 10,000, from 18,000.

And to ensure maximum oversight, Iran "should be limited to one enrichment site," Albright continued, while reducing its store of domestic uranium.

Under a final deal, Iran would also almost assuredly be asked to scrap a controversial heavy-water reactor that the international community fears could be used to process plutonium for nuclear weapons. Since 2006, the U.N. Security Council has demanded that Iran halt its heavy-water processing efforts. And the interim deal already calls for Iran to freeze all progress on the Arak reactor, which has yet to be completed.

Enforcing those goals presents another thorny problem.

There are concerns Iran could "exploit the limited sanctions relief to create loopholes to evade the remaining sanctions," Gary Samore, a former arms control coordinator for the Obama administration, told the New Yorker. If that were to happen, Iran would wind up in a stronger position than when it entered into the negotiations.

To be truly successful, the P5+1 must secure broad access to Iran's nuclear facilities for international inspectors. Furthermore, Iran has "to come clean on the full range of past and present nuclear work by all Iranian entities," according to Michael Singh, director of the Washington Institute for Near East Policy.

After all, it's not like Iran will suddenly forget all the progress it has made towards building a potential weapon. That institutional memory could come in handy if Iran ever decides to renege on a long-term deal, which means the world has to know what Iran knows.

Unlike a military campaign, "success" with regard to Iran will be highly subjective. Indeed, some actors, like Israel, deem any negotiation a form of failure. Diplomacy "is a protracted, messy business with often inconclusive results," wrote the New York Times' Mark Landler, adding that it's "harder for a president to rally the American public behind a multilateral negotiation than a missile strike."

But if the P5+1 can achieve the above goals — long shots in themselves — it would make a pretty strong argument that the group has succeeded in Iran.