General Keane retired in 2003. General Mattis retired in 2013. By law the Secretary of Defense cannot be a former serving officer if that officer left active duty less than seven years ago.
True - but that requirement can be waivered. From what I have seen, Mattis is the more dynamic of the two.