The Times of Israel has reported that the Israeli military detected the activation of Hamas phones using Israeli SIM cards 6 hours before the attack on October 7th.
This reporting suggests that the Israeli military had prior knowledge to the attack and most likely allowed it to happen.