The U.S. will gain access to areas around the Panama Canal for training and humanitarian operations — but Panama has ruled out the establishment of military bases.