Iran's gvoernment is a democratic theocracy. The religious leaders have the power to direct the country but remains focus on the larger issues while the president and others focus on the day to day affairs, but if there isa conflict of interest the religious faction has the power.
In any case Iran has the right to defend itself and eliminate any threats it deems by whatever weapons it has in its disposal, if it has the power to do so, just like any other nation on this planet.