The Home Secretary takes on the head of the civil service and faces the prospect that she may lose her job.