(I should start by saying that Palestine always has the right to use violence against Israel as long as Israel continues to occupy stolen Palestinian land. This is true even according to international law and the international community. People living on stolen property are never innocent. Unfortunately, Palestinians don’t have an organized state or military powerful enough to rid themselves of the illegal occupying power.)
This is what actually happened leading up to the 2014 Gaza massacre:
“Something had to be done, and an occasion arose on June 12, when the three Israeli boys were murdered in the West Bank. Early on, the Netanyahu government knew that they were dead, but pretended otherwise, which provided the opportunity to launch a rampage in the West Bank, targeting Hamas.
Prime Minister Benjamin Netanyahu claimed to have certain knowledge that Hamas was responsible. That too was a lie.
One of Israel’s leading authorities on Hamas, Shlomi Eldar, reported almost at once that the killers very likely came from a dissident clan in Hebron that has long been a thorn in the side of Hamas. Eldar added that “I’m sure they didn’t get any green light from the leadership of Hamas, they just thought it was the right time to act.”
The 18-day rampage after the kidnapping, however, succeeded in undermining the feared unity government, and sharply increasing Israeli repression. Israel also conducted dozens of attacks in Gaza, killing five Hamas members on July 7.
Hamas finally reacted with its first rockets in 19 months, providing Israel with the pretext for Operation Protective Edge on July 8.”
(via Noam Chomsky: The Nightmare in Gaza)
Hamas denied responsibility for the attacks, but many headlines would eventually say that Hamas claimed responsibility for the attacks. Examples:
NPR: Hamas Admits To Kidnapping And Killing Israeli Teens
CBC: Hamas admits kidnapping 3 young Israeli men, setting off Gaza war
CNN: Hamas leader admits militants abducted slain Israeli teens
However, when one actually reads the articles, one quickly realizes that Hamas did not claim responsibility:
Aruri said the operation to abduct the teens was not approved by the Hamas leadership or its military wing, the Qassam Brigades.
(via CNN: Hamas leader admits militants abducted slain Israeli teens)
Hamas leader Khaled Meshaal, who is in exile in Qatar, denied knowledge of the abduction but praised its perpetrators.
(via CBC: Hamas admits kidnapping 3 young Israeli men, setting off Gaza war)
Being from a dissident clan from the same region, the real perpetrators of the crime likely had weak ties to Hamas. Some of them might have been members of Hamas in the past.
The man, Hussam Qawasmeh, 41, part of a sprawling clan in the West Bank city of Hebron with ties to the militant Islamist Hamas movement, was convicted last week of handling $60,000 in five installments from the Gaza Strip to buy two cars, two M-16 rifles and two pistols for use in the operation. In September, Israeli troops cornered and killed the two men they believe carried out the kidnapping and murders: Marwan Qawasmeh, 29, a relative of Mr. Qawasmeh’s, and Amer Abu Aisha, 33.
Having ties or former association with Hamas does not mean Hamas was responsible. Hamas praising the act does not mean Hamas carried out the act.
Likewise, the fact that some of the alleged suspects behind the Paris attacks have/had some affiliation with the Islamic State is still not proof that the Islamic State itself was behind the Paris attacks:
The Expanding Web of Connections Among the Paris Attackers
The Islamic State praising the Paris attacks is not proof that the Islamic State was behind the Paris attacks.