1. #1
    Titan Synthaxx's Avatar
    Join Date
    Feb 2008
    Location
    Rotherham, England/UK
    Posts
    13,116

    Addon Communication

    Hey all,
    I'm currently trying to understand addon communication. As I understand, you can either do the following;
    - SendAddonMessage() to a preset channel (RAID, GUILD, WHISPER, OFFICER, PARTY, BATTLEGROUND)
    - Send a message over a channel, and parse it out at the other end

    The first is more 'secure' as it requires a prefix to be set and the messages aren't displayed publicly. The second is more free, but absolutely not secure, and anyone could imitate the addon messages.

    My problem is that I'd like to create a "server wide addon" so to speak. By this, I mean that I want to create an addon that can communicate with other users of the same addon regardless of where they are. I have got one such idea;
    - Addon joins a channel, unregistering the "CHANNEL_UI_UPDATE" event beforehand, and reregistering it afterwards
    - Send message over the channel, and parse it at the other end
    OR
    - SendAddonMessage() to each member of the channel in whisper

    My problem with this is that it feels like I'm hacking around the real issue, and that sending messages over the channel still isn't 'secure'. More to the point, it's taking up a channel slot, and the user could always 'reenable' the display of messages sent to the channel. Is there any real solution to this issue? Do I have to abandon the idea completely because there's no elegant solution?

    My idea was to find a way to deal with the spam of guild invites sent by SGI users (or rather, any guild invite since they all trigger the same event), and communicating the names of these players to other users of my addon (and thus when a new character is created, they get a list of people to automatically decline invites from - allowing each person to whitelist guilds, but still communicating who it was sent from in the event someone else wanted to blacklist those guilds).

    I can understand why Blizzard have made addon comms work this way - creating a dedicated addon channel faction-wide [that is a valid SendAddonMessage() target] would create such heavy traffic as everyone and their mother would be posting on to it, and there's always a risk of addons getting crosstalk from each other.

    So, any ideas? I'm really looking for a way to communicate with other users of my addon, regardless of being in the same party, raid, battleground, zone, etc. limited to faction (obviously this was implied regardless as an in-game limitation), but without taking up a chat channel slot.

    I'm happy to abandon the idea if it's not possible, but I figured I'd ask and see if anyone more versed in the API could direct me. I don't have a problem creating the addon (I made something similar to this in my sandbox addon, but never released it publicly due to the concerns mentioned above), only finding a better way of handling comms.

    Thanks
    Ex-coder, gamer - Stepped away from dev.
    Done/Planned: Leedsfest 2014, Mallory Knox (Nov 2014), Some surprises | Upcoming: Soundwave (Feb 2015)
    Awaiting UK/EU tour dates: Of Mice and Men, Jimmy Eat World, Architects (>Mar. 2015)
    Quote Originally Posted by George View Post
    If NSA is building my profile from tonight's "browsing habits", they're in for a treat: women with three breasts, men with two penises, fake nipples...

  2. #2
    Unfortunately not quite what you want I think, but a pretty interesting idea regardless and pretty relevant to the discussion LibDSA @ wowinterface.
    A library for validating and generating Digital Signatures in World of Warcraft.

    The Digital Signature Algorithm provides a way of ensuring data received from another player originated from the addon developer and was not modified as it was passed between players.

  3. #3
    It seems like this wouldn't be useful because the addon needs to generate arbitrary messages in addition to validating messages from somebody else.

    It would be good for things like update alerts. I make <popular boss mod addon>, I want a message that tells all users to update from www.mysite.com instead of www.curse.com for some reason (maybe I left curse because of policy disputes or something). In that case I could generate the message and sign it on my computer, paste it into the next major release of my addon and then people with the older versions could verify that it came from me. If you received a message from <boss mod user 1> that was signed by me: you know I sent it, even though it came from an untrusted intermediate (assuming you had received my public key from a trustworthy source some time in advance: like the first release of the addon)

    Once I give up my private key (which I would need to do if I want the addon to sign messages as me): anybody can use it to generate any arbitrary message and it will validate.
    A new UI series for 5.2Steal my old UILearn about WeakAuras • Nobody to raid with right now so no PVE videos.

  4. #4
    Doesn't oQueue do exactly this?

  5. #5
    Titan Synthaxx's Avatar
    Join Date
    Feb 2008
    Location
    Rotherham, England/UK
    Posts
    13,116
    Quote Originally Posted by ComputerNerd View Post
    Unfortunately not quite what you want I think, but a pretty interesting idea regardless and pretty relevant to the discussion LibDSA @ wowinterface.
    I did take a look at that before I asked the question, but I'm not sure it's what I'm after. The core issue of actually communicating still remains. It's a fantastic tool of course, just not what I'm looking for in this instance. I did also find a SHA256 LUA implementation, but again, while useful, it's not what I'm looking for this time. I suppose there's also some other encryption and hashing LUA implementations out there.

    I suppose I could go down the route of using one of the encryption ones, and using properties about a character as the key. Since I can validate the key properties in game, and send them through SendAddonMessage() to hide them (only using the channel as a list of people with the addon), it'd perhaps be enough to make it a little too time consuming for a potential attacker to generate valid messages (since the message each person receives through the addon channel will be different due to the properties of each character themselves being different). It, of course doesn't stop someone creating an addon to exploit it, but I figure that's the case with most addons already.

    It's a shame really. Again, I see why they don't allow 'public' addon comms, but it does make things more difficult in cases like this.

    Quote Originally Posted by HarleyM View Post
    Doesn't oQueue do exactly this?
    I did take a look at oqueue but I can't seem to find any details on how it does this, other than making use of the battle.net friends list (and setting your message to "oq" or some such). More to the point, apparently it's been shunned by the development community as it causes excessive lag due to crossing the boundaries between servers. It's also been shunned by some of the community outside of developers for the general spammy approach it takes to solving it's own problem.

    However, the main point is that I couldn't actually figure out how communicates outside of the preset channels. I looked through the code but there's almost 20,000 lines in just the main LUA file alone, and it even has it's own SendAddonMessage() function.
    Ex-coder, gamer - Stepped away from dev.
    Done/Planned: Leedsfest 2014, Mallory Knox (Nov 2014), Some surprises | Upcoming: Soundwave (Feb 2015)
    Awaiting UK/EU tour dates: Of Mice and Men, Jimmy Eat World, Architects (>Mar. 2015)
    Quote Originally Posted by George View Post
    If NSA is building my profile from tonight's "browsing habits", they're in for a treat: women with three breasts, men with two penises, fake nipples...

  6. #6
    Field Marshal tinystomper's Avatar
    Join Date
    Sep 2012
    Location
    mostly florida
    Posts
    85
    Quote Originally Posted by Synthaxx View Post
    I did take a look at oqueue but I can't seem to find any details on how it does this, other than making use of the battle.net friends list (and setting your message to "oq" or some such). More to the point, apparently it's been shunned by the development community as it causes excessive lag due to crossing the boundaries between servers. It's also been shunned by some of the community outside of developers for the general spammy approach it takes to solving it's own problem.

    However, the main point is that I couldn't actually figure out how communicates outside of the preset channels. I looked through the code but there's almost 20,000 lines in just the main LUA file alone, and it even has it's own SendAddonMessage() function.
    that's pretty funny and wholly incorrect. one person had a hissy fit on reddit. that hardly constitutes 'shunning'. of course, the issue was/is user ignorance of how oQueue works and why (which is pretty bad considering the user that had the fit). as for lag, that hasn't been an issue for many months (explosive growth caused a spike in the # of msgs... which was dealt with within 2 days. still nothing compared to the number of msgs your client deals with constantly. want to see? type /etrace and go into combat)

    Quote Originally Posted by Synthaxx View Post
    However, the main point is that I couldn't actually figure out how communicates outside of the preset channels. I looked through the code but there's almost 20,000 lines in just the main LUA file alone, and it even has it's own SendAddonMessage() function.
    there are no x-realm comms for addons. you're left to figure it out on your own.

  7. #7
    Titan Synthaxx's Avatar
    Join Date
    Feb 2008
    Location
    Rotherham, England/UK
    Posts
    13,116
    Quote Originally Posted by tinystomper View Post
    that's pretty funny and wholly incorrect. one person had a hissy fit on reddit. that hardly constitutes 'shunning'. of course, the issue was/is user ignorance of how oQueue works and why (which is pretty bad considering the user that had the fit). as for lag, that hasn't been an issue for many months (explosive growth caused a spike in the # of msgs... which was dealt with within 2 days. still nothing compared to the number of msgs your client deals with constantly. want to see? type /etrace and go into combat)
    I actually don't visit reddit, nor did I read the whatever post you're referring to. I do sometimes come across interesting and relevant posts during Google searches, but that wasn't one of them. No, I've read threads about it over on both the EU and US official forums, I've read a few posts here complaining about it, and I recall reading a few posts on WoWinterface complaining about it. All of that is what I consider to be shunning. I don't consider one person's opinion to be shunning, I require a decent majority to have demonstrated similar opinions before I come to that conclusion.

    I will take note that all 3 of your posts have been completely on the topic of oqueue, and you're evidently a supporter of the addon (at the least that can be said). If you're not willing to accept that others have drawn their own conclusions about it, and you're unwilling to provide even some pointers on the solution to my problem, then I'd politely ask that you refrain from commenting on this thread.

    If you've got some constructive input and some advice, I'm all ears. If you want to discuss addon communication, I'm all ears. If however, you're just here to tell me that my opinion is wrong, or you refuse to acknowledge others opinions regardless of whether you agree with them or not, as opposed to discussing the issue, then this isn't the thread you're looking for.
    Ex-coder, gamer - Stepped away from dev.
    Done/Planned: Leedsfest 2014, Mallory Knox (Nov 2014), Some surprises | Upcoming: Soundwave (Feb 2015)
    Awaiting UK/EU tour dates: Of Mice and Men, Jimmy Eat World, Architects (>Mar. 2015)
    Quote Originally Posted by George View Post
    If NSA is building my profile from tonight's "browsing habits", they're in for a treat: women with three breasts, men with two penises, fake nipples...

  8. #8
    Quote Originally Posted by Synthaxx View Post
    I suppose I could go down the route of using one of the encryption ones, and using properties about a character as the key. Since I can validate the key properties in game,
    Err... what exactly stops any potential hacker from copy/pasting your signing mechanism to his own script and send perfectly valid arbitrary messages?

    Your "keys" for encryption would be either hardcoded in your own OPEN code or available to some other character's properties that MUST BE OPEN to any other character since you need them to verify message. Therefore anybody have full information to impersonate anyone else in this communication.

    The ONLY secure way is private/public key pairs, but you have no secondary secure channel for initial key exchange - only faction wide pool, so that's out of question too. Well, theoretically each user could announce his public key through SendAddonMessage() + WHISPER to each interested party, but I think you'd quickly reach throttling limit that way. So to make such system work you'd need local side cache and ability to smart revalidation on-demand that wouldn't produce too much traffic. Depending on nature of your addon, you can, for example, postpone validation only until you really need it.

    Hmm... I feel I'm over thinking too much without really knowing your problem. Can you describe in more details what exactly you need comms for?
    Last edited by rowaasr13; 2013-07-12 at 04:54 PM.

  9. #9
    Any sort of inter-addon communication can be faked with sufficient effort. Period.

    What you can do, however, is make communication intransparent to parties forwarding the message through, say, a battle.net message mesh, by encrypting the message with a reversible PSK algorithm of your choice, relying on the two ends to negotiate the key for the exchange through outside means beforehand (and requiring them to enter it). I'm not sure what the purpose of that would be, though, so at this point it's just fancy theory.
    UI & AddOns expert | Interface & Macros moderator - My work

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •