The Vor Game – Lois McMaster Bujold
In this book, Miles eventually joins forces (literally) with his Dad, to repel an invasion of the Hub. Before that however, he finds himself on a cold outpost, having graduated from the military Academy.
His commanding officer is a nasty piece of work, and Miles doesn’t find much camaraderie with his fellow troopers. Imperial Security (ImpSec), more specifically Illyan (another character in it for the long run) start to see the possible benefits of such an un-orthodox agent as Miles.