After the midterms get rigged (ICE at polling stations, a multinational mercenary group at USPS warehouses, Trump supporters in election certification offices, etc.), some leftist accelerationist expecting to get killed anyway will probably provide a Reichstag Fire. The Trump administration will have national security agencies look the other way like the Bush administration did with the warnings about 9/11, and voilá, the current amount of surveillance will "be insufficient to stop the threat from within".
As for the specific terrorist attack they'll let slip through the net - I don't know. Maybe let the white house get bombed so all of it will need to be rebuilt in a grander style. Maybe let the VP get assassinated so some unelected billionaire puppet can take his place and take over when Trump croaks. Maybe there are few enough terrorists that they'll let most plans through, or maybe they'll do a false flag to have full control.