Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KaiOS support #138

Open
mthu opened this issue Jul 26, 2021 · 4 comments
Open

KaiOS support #138

mthu opened this issue Jul 26, 2021 · 4 comments
Assignees

Comments

@mthu
Copy link
Contributor

mthu commented Jul 26, 2021

We are playing with KaiOS push notifications.
Their notification service only seems to accept Content-Encoding: aesgcm. They also seem to refuse to accept Vapid02 keys (vapid Authorization scheme). Based on this code in JS library, it seems that it's a good idea to couple aesgcm encryption with WebPush (Vapid01) authorization scheme. Mozilla service happily accepts both Vapid01 and Vapid02 keys but KaiOS service does not.

It would be great if the Python lib also coupled aesgcm encoding with Vapid01 keys. Now Vapid02 is selected by default (if not provided directly as an object). This would help newcomers looking at error 400 without any message provided by the KaiOS service. On the other hand, I have not found any relation between Content-Encoding and Authorization schema in the docs.

@jrconlin
Copy link
Member

Sigh. aesgcm is from the draft standard, and there are a LOT of reasons that it should stop being supported. It kind of sounds like KaiOS hasn't updated their UA libraries to use the Android Components work, which is a bit sad, but understandable, but does mean that there's a lot of non-spec stuff in there.

For a lot of those reasons, I think it's better to require explicit declaration if you need to use the old specifications. Otherwise, it's too easy to screw up and potentially expose data.

I can see creating something like a --kaios flag as a convenience flag, maybe.

@mthu
Copy link
Contributor Author

mthu commented Jul 26, 2021

I based my presumptions on this issue web-push-libs/web-push#603. I received the same error with pywebpush and default usage scenario (Vapid02 and aes128gcm). When changed encoding to aesgcm (kept default Vapid02 auth), I received status code: 401, body: {"errno":"116"} which is not (surprisingly) documented anywhere.
So I guess they haven't changed a thing.

OTOH if I used the JS library, I would avoid some extra detective work since in JS lib, aesgcm implies Vapid01 auth scheme.

@jrconlin
Copy link
Member

heh, well the js/python fail is definitely my fault because there's no common suite of tests and the python side has gotten a lot more external attention. Yeah, 401:116 is something they've defined, and is probably in whatever they're running as their push server. (REALLY hope it's not a variant of the old python2 autopush server, but 🤷🏻‍♂️)

Not sure when I can get to this, but I'll try to come up with something.

@jrconlin jrconlin self-assigned this Jul 26, 2021
@farooqkz
Copy link

farooqkz commented Dec 9, 2021

I'm having the same problem and now I realize the problem was not on my side...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants