Germany’s parliament has passed a law authorizing the country’s domestic and foreign intelligence agencies to actively counter espionage, terrorism and sabotage.