President Obama on Thursday signed orders shutting the network of secret prisons and closing the Guantánamo detention camp within a year.