mozilla-services / autopush

Python Web Push Server used by Mozilla
https://autopush.readthedocs.io/
Mozilla Public License 2.0
217 stars 34 forks source link

Add uaid to outbound Push messages #1320

Closed jrconlin closed 5 years ago

jrconlin commented 5 years ago

Currently, autopush presumes that one client can only have a single UAID. This may not be true if a device supports multiple profiles. We should include the recipient UAID in the outbound message (for webpush, and bridged connections). This change is for Bridged connections only.

pjenvey commented 5 years ago

The webpush (websocket) doesn't really need it.

I'm not sure APNS supports multiple user profiles/accounts (if not, maybe it will eventually). fcm/adm definitely do.

bbangert commented 5 years ago

Will the recipient not be able to suitably locate the local subscription based off the channel-id alone then? Or do you anticipate a client registering the same channel-id for multiple uaids?

jrconlin commented 5 years ago

It's more a precautionary thing. We currently consider UAID+CHID to be the unique identifier. That means there's a vanishingly small, but possible conflict if two different UAIDs for a given profile were to use the same CHID.

bbangert commented 5 years ago

Actually, I recall a case where a channel-id was hard-coded in the client code-base.... so yes. I'm fine with included the uaid in the bridged message. Can we update the issue to reflect this is bridged only?

pjenvey commented 5 years ago

Another concern here: Julien originally did not even want uaids stored in plain text #228