True, but that alone does not automatically mean those actions were right. "The ends justify the means" is a dangerous philosophy for an entity like the Federation to have.
We throw around "right" and "wrong", but honestly the morality of any action comes down to context. It would be wrong for Sisko to gun down Vreenak on the Promenade just to get his jollies. Sacrificing Vreenak so millions of lives are saved in the long run and the Alpha Quadrant isn't under the boot of the Jem'Hadar, is probably right. When you consider there looked to be no other way to achieve the goal that was needed.