Among my studies in college was two semesters on international law: so I know what I’m talking about.
You can’t have international law without nations; and for the law’s purpose, this means states: organized political entities. And the law says that states have a right, under certain circumstances, to make war–subject to various limitations on how the war is waged, and why. There is a right to self-defense, but not a right to conquest. And the rules of warfare are established among states agreeing as to what those rules are.
None of this applies to terrorist organizations. They are outlaws, in the literal sense of the word. Face-to-face, cold-blooded murder of noncombatants is not allowed.
In World War II the Axis powers freely violated all international law applying to the conduct of a war. The leaders of those states were punished after the war, many of them put to death. The laws were strengthened.
Hamas–which is not a state, and has not signed any of the international conventions regarding the rules of war–whose “fighters” have openly committed war crimes–has placed itself outside the laws of nations. Its invasion of Israel, and the conduct of its personnel in Israel, cannot be defended. International law has failed to restrain Hamas. For all its supposed value, the law is only as effective as the nations’ commitment to enforce it.
Which doesn’t seem all that credible, does it?