If Sessions leaves, who can replace him? Three scenarios (Vladeck, justsecurity.org)
There has been some discussion about what happens if Sessions is fired or resigns. I believe this is the most definitive article on the options, from Steve Vladeck at Just Security.org.
https://www.justsecurity.org/43477/sessions-succession-scenarios/
Scenario I: The DOJ Succession Statute and Executive Order
(Short story: Rosenstein, then -ugh- Rachel "GOP/Federalist partisan" Brand)
Scenario II: The Federal Vacancies Reform Act of 1998
The upside of the Vacancies Reform Act-route is obvious: President Trump could name someone much more sympathetic to his views to serve as Acting Attorney General.
...
...there would at least be the prospect of a legal dispute.
...
In other words, the Vacancies Reform Act route, even if its available in a case in which the previous Attorney General has been fired, is only a short-term solution.
Scenario III: The Recess Appointment Elephant in the Room
So if the Senate recesses for 10 days or more in August (which currently appears at least a decent likelihood), President Trump could simply recess appoint whoever he wants to serve as Attorney General until the end of the next Senate session (i.e., January 3, 2019).