Truth, lies and historical fiction; How far can an author go?

Truth, lies and historical fiction; How far can an author go?