My first choice would be a tool similar to the one shown by Paul, and it can be in HSS: a standard boring tool. Ensure the face of the tool is parallel to the axis to give the groove equal depth along its width.
The type Jeff illustrates is fine but does need plenty of room beyond the groove. A long-proven alternative capable of working right into the corner of a blind bore, holds the cutter in a hole at 45º across the end of the bar, with a grub-screw that protrudes less than the cutter. Obviously for a square-section groove the cutter itself is ground back at the corresponding 45º.
Tasks like this would be greatly facilitated by saddle or cross-slide stops in both directions. (Depending on lathe and set-up, the rear stop could be the tailstock, or a bar held in it.)
'
Recently I carried a somewhat similar task in PVC, where I needed not a groove but a narrow ridge, to make a special clamp with partially-closed bore for a corrugated plastic hose.
I experimented with something like that shown by Paul, by turning and filing, then hardening and tempering, a silver-steel cutter held by central countersunk screw onto the end of an existing mild-steel boring-bar. It was not very successful, but I think only due either to the "insert" shape not being quite right, or it slipping.
Certainly a field for further experimenting, but not original. I'd copied the idea from a trade text book from pre-carbide insert days, for a HSS-equivalent in profiling and threading tools.