The actions of Hamas in this attack do not retroactively justify the atrocities that Israeli settlers have inflicted for decades on Palestinians, nor the atrocities the Israeli forces are doing in retaliation. None of these atrocities justify the abuse of noncombatants by Hamas, either. One bad government doesn't erase the other, and common folk pay the price regardless.
War is fought to stop the enemy from having power over you. In many situations this involves lethal violence. In no situations this is advanced by systematic rape, or racial slavery, or concentration camps etc. It is important to distinguish the means and the dynamics of violence.
I've said it before and I'll say it again: for as long as a single fascist wields a rifle, we are against peace and for war. The resistance of Palestinian people is entirely justified, lethal force inclusive. What Hamas did in this action was however not just lethal force; it wasn't an action to curtail the enemy; and the moment that you think anything leaders plot is justified if it's leaders of an oppressed people, you lose the distinction between the governments and the people, and with it class consciousness.