International law authorizes Israel to initiate military countermeasures in Gaza. If Gaza is properly seen as having independent sovereignty, Israel's use of force is permissible on the grounds of self-defense. If Gaza is properly seen as lacking any independent sovereignty, Israel's use of military force is permissible as in other non-international conflicts.
The rule of "distinction" includes elements of intent and expected result: so long as one aims at legitimate targets, the rule of distinction permits the attack, even if there will be collateral damage to civilians. The rule of "proportionality" also relies upon intent. If Israel plans a strike without expecting excessive collateral damage, the rule of proportionality permits it. Israeli attacks to date have abided by the rules of distinction and proportionality.
Israel's imposition of economic sanctions on the Gaza Strip is a perfectly legal means of responding to Palestinian attacks. Since Israel is under no legal obligation to engage in trade of fuel or anything else with Gaza, or to maintain open borders, it may withhold commercial items and seal its borders at its discretion.
The bar on collective punishment forbids the imposition of criminal-type penalties to individuals or groups on the basis of another's guilt. None of Israel's actions involve the imposition of criminal-type penalties.
There is no legal basis for maintaining that Gaza is occupied territory. The Fourth Geneva Convention refers to territory as occupied where the territory is of a state party to the convention and the occupier "exercises the functions of government" in the territory. Gaza is not territory of another state party to the convention and Israel does not exercise the functions of government in the territory.
The fighting in Gaza has been characterized by the extensive commission of war crimes, acts of terrorism and acts of genocide by Palestinians, while Israeli countermeasures have conformed with the requirements of international law.
International law requires states to take measures to bring Palestinian war criminals and terrorists to justice, to prevent and punish Palestinian genocidal efforts, and to block the funding of Palestinian terrorist groups and those complicit with them.