-
Notifications
You must be signed in to change notification settings - Fork 32
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
channel: add realtime encryption #603
Conversation
Need to check on how encryption works in rest channels. You can check and implement if it's easy, we will review. |
Thanks - thats what this PR is :) |
Can you add integration tests for this? Also, check if changes are not failing existing integration tests. Thanks! |
Oh I guess |
6560d13
to
db27254
Compare
db27254
to
f15ea04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far, although I'm hesitant to approve because I don't think we're doing enough to test this at the moment. The test added here would pass even if the library just ignores the cipher param entirely. At a minimum, could we add a test which creates two realtimes with a cipher mismatch and checks that the behaviour is correct (see ably-js example). It would also be good to test the behaviour when sending an encrypted message to a client without a cipher and vice versa.
f15ea04
to
4672dd4
Compare
Sure, extended the test to include a channel without a cipher, the that the message doesn't equal the original |
@owenpearson @sacOO7 can I get a review on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks
@owenpearson Thanks can this be merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
DSC-74
@owenpearson @sacOO7 we're looking to support encryption with in the database connector, though AFAICT encryption isn't supported for realtime channels
Looking at rest channels, looks like its just doing:
Though I know why
withEncodedData
isn't run on non-rest channels?Just adding draft PR to start discussion - this just copies
withEncodedData
intoRealtimeChannel