what are the exact wire colors, please?
If not a solenoid, then what do you think it is? If you don't know, then why reject a suggestion that accounts for a 4 wire device (theres not many on a CB ((key switch or solenoid are the 2 most common that I know of)) that fits within the stock rubber mounting grommet? Especially when that grommet will then in turn plug to the side cover electrical panel perfectly?
Do you have a solenoid on the bike already?