Who said that any of it is legal? Keeping in mind that when the government does something, it usually takes more than 24h for there to be an official determination on whether they broke the law.
They will deploy this on a domestic scale and claim to use it to locate non-domestic threats. I can’t believe anyone is falling for this.