The spending package that President Trump signed Friday includes a measure that gives U.S. investigators access to data stored on overseas cloud servers, resolving a long-running legal battle but drawing criticism from privacy and human-rights activists.