A panel appointed by President Obama to review counter-terrorism methods is proposing major changes to the way that the National Security Agency collects and stores information, including a recommendation that the NSA cease keeping a database rumored to contain more than 1 trillion phone records.

The report by the five-member Review Group on Intelligence and Communications Technologies is set to be released Wednesday night, but its contents have been widely leaked to the Washington Post and other sources. Update: here’s the report.

In other significant findings, the panel advises the White House to bar the NSA from leaning on tech firms to build “back doors” into communication tools on the grounds that doing so harms the safety of US computers. It also suggests separating the offensive and defensive duties performed by US spies into separate organizations.

The report’s findings came as a surprise, in part because the panel was selected by the White House and was expected to endorse the status quo.

The report also comes as the second major blow this week to the NSA. On Monday, a conservative judge issued a stinging decision declaring that the phone database — which appears to allow the NSA to track anyone who knows someone who called Domino’s Pizza — is “Orwellian” and unconstitutional.

The Wall Street Journal has another view. In an editorial called “Disarming Surveillance,” the paper blasted the review panel’s recommendations as naive and dangerous.