The Obama administration got an unpleasant surprise from yesterday’s open hearing looking into the actions of the NSA and its surveillance operations, and from one of its closest allies.  Sen. Dianne Feinstein (D-CA), chair of the Senate Intelligence Committee, had defended the NSA’s operations as crucial and law-abiding, but reversed course yesterday.  Feinstein announced new legislation that would restrict access to phone records, searches, and require more oversight over NSA operations in the future:

Sen. Dianne Feinstein, D-Calif., the chair of the Senate Select Committee on Intelligence and a longtime defender of the National Security Agency, unveiled plans Thursday for legislation designed to rein in some aspects of the NSA’s controversial domestic surveillance programs.

At a rare open hearing of the intelligence panel, Feinstein said her legislation would limit the NSA’s access to the so-called metadata it collects on Americans’ cell phone usage and would seek to codify the legal standard under which such data could be searched by NSA workers.

The legislation also would require the NSA to reveal more details about its use of the information it collects under two U.S. laws, the USA Patriot Act and the Foreign Intelligence Surveillance Act, including making annual reports to Congress on how many times NSA searches its database of cell phone information.

Feinstein’s championing of legislation to put new restrictions on the way the NSA operates was something of a surprise and signals that Obama administration efforts to contain congressional complaints about the programs have failed for now. She announced her initiative at a hearing where Director of National Intelligence James Clapper and the NSA chief, Army Gen. Keith Alexander, appeared.

Feinstein blamed the media for reporting on the leaks for making some changes necessary, saying that the reports generated “an unfortunate but very real amount of public skepticism and distrust of the intelligence community.” That has forced Congress to act to restore public confidence, Feinstein argued.  This is a bit like blaming the local paper for reporting on burglaries that require better security, but at least it’s some kind of impetus for action.

The legislation proposal goes farther than just dealing with embarrassing leaks.  The new bill would set down in law the standard needed to be met by NSA for “reasonable and articulable suspicion,” an ambiguous standard used to gain approval for almost every application NSA has submitted to the FISA court.  Feinstein also noted that an EO last amended in 2008 allows intelligence agencies to operate outside the confines of FISA in certain circumstances, and wants to find out to what extent the intel communities have used that leeway.

This is a setback to the Obama administration, although perhaps not a total loss; Sen. Ron Wyden suggested that he’s not satisfied with Feinstein’s legislation and will press for more action.  The White House has only itself to blame. Both James Clapper and Keith Alexander misled Congress on the NSA’s operations, and Barack Obama chose to leave them both in place.  That meant that the administration had no choice but to send them back to Capitol Hill to assure Congress that they’re really being truthful now, with a pinky swear or something.  In the absence of new voices, even Feinstein can’t accept those assurances with a straight face.

Of course, it doesn’t help to have the more salacious aspects of surveillance on display. NBC’s Today show delves into the LOVEINT story this morning, which is … more than a month old, but sells laundry soap pretty much whenever you talk about it, I guess.

Visit NBCNews.com for breaking news, world news, and news about the economy