A Just Determination by John G. Hemry
If you see it in the bookstore nowadays, you will see in font as big if not bigger Jack Campbell. This is because he didn't sell well enough under his own name -- I don't know why -- and had to resort to a pseudonym. It worked, and now he's getting reissued.
Ensign Paul Sinclair, newly assigned to the space ship Michaelson, arrives there to take up his duties, and get the collateral duty, among others, of legal officer. Which means that after he has met the captain and been thoroughly less than impressed with his character, he gets the job of reviewing their orders and the vast discretion the captain has under them.
The particular orders are to patrol a section of space the United States claims and deal with any attempts to contest its sovereignity. You can read his naval background in the sections about the patrol, and Sinclair's interactions with fellow junior officers, enlisted, and superiors, both in his usual tasks, and as a legal officer. Accidents and minor offenses occur and things must be done.
And in due course, there comes a time where Captain Wakeman has to use his discretion, which he hasn't got.
They had talked earlier about what it would take to return early. It is not pleasing to actually have it happen. And the investigation leads to consequences and courtroom drama. Sinclair must make decisions about his own testimony which have impact both on the trial and on his career and relationships with the rest of the crew.