internetBrazil’s Congress on Tuesday passed comprehensive legislation on Internet privacy in what some have likened to a web-user’s bill of rights, after stunning revelations its own president was targeted by U.S. cyber-snooping, AFP reports.

The lower House of Deputies had passed the bill earlier, and late Tuesday the Senate gave it a green light. That leaves only the expected signature into law from President Dilma Rousseff.

“The bill sets out principles, guarantees, rights, and duties for Internet users, and Internet service providers [in Brazil]”, a statement on the Senate’s website said.

The law is aimed at balancing freedom of expression and the web-users’ rights to privacy and protection of personal data, Rousseff said.

Still, Brazilian authorities do not control what happens outside their country; the government-backed law stopped short of requiring companies such as Google and Facebook to store local users’ data in Brazilian data centers.