The Israeli invasion is strictly to control the rockets, both presently and in the future. They have that right, under international law, no matter how much you don't like it.
But, again, that's not the point...

based on the laws of war as practiced and understood by the nations that actual go to war.
The fact that international laws and norms of war are outdated and apply best to national wars between national states is another topic entirely. The point is that according to the letter and spirit of these aforementioned, the Israelis are mucking things up.