Parliament passes legislation months after a thwarted attack at Leipzig-Halle airport, which Berlin linked to Russia.