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

Decide how to securely do notifications from a Directory #42

Open
mmccool opened this issue Aug 3, 2020 · 4 comments
Open

Decide how to securely do notifications from a Directory #42

mmccool opened this issue Aug 3, 2020 · 4 comments
Labels
Security security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response.

Comments

@mmccool
Copy link
Contributor

mmccool commented Aug 3, 2020

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.

@mmccool
Copy link
Contributor Author

mmccool commented Aug 3, 2020

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.

@mmccool
Copy link
Contributor Author

mmccool commented Aug 3, 2020

Conclusion: let's use SSE. Need to implement a prototype, however.

@farshidtz
Copy link
Member

Relevant issue to discuss the functional requirements: #28

@farshidtz
Copy link
Member

farshidtz commented Aug 15, 2020

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:
https://tools.ietf.org/html/rfc6750#section-2.3

Because of the security weaknesses associated with the URI method
(see Section 5), including the high likelihood that the URL
containing the access token will be logged, it SHOULD NOT be used
unless it is impossible to transport the access token in the
"Authorization" request header field or the HTTP request entity-body.
Resource servers MAY support this method.

There are of course polyfills for browsers and modern libraries which allow setting Authorization header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Security security-tracker Group bringing to attention of security, or tracked by the security Group but not needing response.
Projects
None yet
Development

No branches or pull requests

2 participants