Is Torture Ever Jusrified?

Many people would argue against torture, in theory. However, suppose torturing one person could prevent an attack on millions of people? On the other hand, if one says torture would be justified only in such extreme circumstances, who gets to decide when the situation warrants it? There is also the question of what, exactly, constitutes torture. This is an example of a wider philosophical question of “does the end justify the means?”