They look like they’re machined into the barrel but they are not. They are pressed into a key slot and pinned in with a cross pin. The pin is then dressed down and polished with the barrel, making it disappear.

It is very difficult to replicate and have the pin be invisible and of course blued guns will have to be reblued.