It's probable they do things that are illegal under US law, but I doubt this is one of them.
Though NSA's actions may or may not be illegal in the US, there are other standards used to judge or analyze military action in the global economic marketplace.
Perhaps the constitution allows the president to do whatever he or she wants with the military (as long as it is within the historic bounds of what militaries do) without triggering the need for congressional approval unless it reaches a "state of war" at which point people might actually start dying.
That would seem like the sort of practical level of discretion that a country would give its executive branch, but I can't help thinking that there could or should be some law somewhere that gave the president's actions against allies some type of legislative basis, so that voters had an idea of how the president would use these secretive powers, and could hold the executive to account at the ballot box.