I always assumed it was USSS that assigned codenames to Presidents. It’s in fact the White House Communications Agency which falls under DoD. It’s no wonder DoD knows so much of what was going on in the White House.
https://en.m.wikipedia.org/wiki/White_House_Communications_Agency