The White House said Friday that questions about NSA surveillance would not undercut the president's ability to discuss civil liberties with Chinese President Xi Jinping this weekend, arguing the recent controversy instead offered a template for how to balance between security and privacy concerns.

“This is a pretty good illustration of type of conversation we want to have about respecting civil liberties and protecting the constitutional rights of the people that you govern," White House spokesman Josh Earnest told reporters aboard Air Force One on Friday.

Obama was expected to discuss Chinese cybersecurity and spying with Xi during the summit at a resort outside of Los Angeles. Obama has also pressed the Chinese president on the importance of human rights in previous encounters, ostensibly urging the leader to provide greater protections for political dissidents and journalists.

But recent revelations that the National Security Agency (NSA) has collected domestic phone data, as well as international Internet data from major corporations like Google and Microsoft, could put Obama on shakier footing.

Still, the White House insisted Friday that the controversy over the NSA program could be a teaching moment.

"What the president did, was he put in place a very strict oversight regime, one that he strengthened when he took office … one that constrained his own ability, constrained his own authority. I think that is a testament to the strength of our system of government," Earnest said.

Earlier Friday, the president defended the surveillance as striking the right balance between national security and privacy concerns.

“You can complain about Big Brother and how this is a potential program run amok, but when you actually look at the details, I think we've struck the right balance," Obama said.