See if the documentation that came with it says if there is a fuse built into it.
If there is not, or you don't know, then you should have a fuse between it and the battery.
It does not need a resistor.
You can hook it up either way, either directly to the battery (with a fuse), or into the wiring harness.
Directly to battery:
Install a fuse between the charger and the battery.
Be aware that anything connected to the USB port will be constantly drawing power, even when the bike is off. If you forget about it, it could kill your battery.
Connect the black wire from the charger to one of the ground wires on your harness (green) or to any good grounding location on your bike (frame, engine, battery - terminal).
Into the harness:
Connect the usb charger's red wire to one of the black wires in the harness. On CBs, the black wires are switched power (+12V) meaning they are only on if the key is switched on. In this case, you do not need to install a fuse because it is already behind one, the main fuse (though another fuse won't hurt if you want to add it).
Connect the black wire from the charger to one of the ground wires on your harness (green) or to any good grounding location on your bike (frame, engine, battery - terminal).