The President was within the compound during the attack, which shocked the nation and raised questions about the security of the country’s most fortified facility.