WASHINGTON – The National Security Agency’s vast data collection program targeting foreign nationals is a largely legal, valuable tool in fighting terrorism, a watchdog panel said Tuesday.