-
Notifications
You must be signed in to change notification settings - Fork 17
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
Decide how to securely do notifications from a Directory #42
Comments
Needs to work through firewalls. SSEs do. Webhooks not. Conexxus uses SSE for this use case, as well as websockets (using SSE streams). So SSE seems like the best option. But... AWS does not support SSE in lambdas. The SSE over websockets is interesting but not currently a supported subprotocol. |
Conclusion: let's use SSE. Need to implement a prototype, however. |
Relevant issue to discuss the functional requirements: #28 |
Added a draft PR to describe the interaction on top of SSE. One technical limitation is that early SSE implementations (including HTML5 EventSource) do not allow setting custom headers in the initial HTTP request. Authorization header is required in few Oauth2 flows and passing it as a query parameter is not advised:
There are of course polyfills for browsers and modern libraries which allow setting Authorization header. |
If we do native HTTP approaches, there might be a problem with sleeping devices. Polling is not efficient.
So a scheme like MQTT would make more sense, but we need to use a secure variant.
We could also support a scheme where the device could explicitly ask for updates (eg get a history of notifications it might have missed). The devices that don't use an HTTP-native notification would be expected to check in.
The text was updated successfully, but these errors were encountered: