-
Notifications
You must be signed in to change notification settings - Fork 140
2.1.0 Release #251
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
Merged
Merged
2.1.0 Release #251
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copied relevant bits for our decryption needs from: https://github.com/freeeve/nacl-java/blob/0369ed1b166591db9f7a2d511a3554c2376871dd/src/main/java/com/caligochat/nacl/SecretBox.java adjusting the entry point to take the key in the constructor, have preconditions checked and better signalling AuthenticityException, and added the clearKey method. Added MIT License to the copied files.
Following on Danielle's feedback: https://github.com/pusher/pusher-websocket-java/pull/235/files#r397189111
Add NaCl's symmetric key authenticated decryption code
Add Truth assertion lib — approved by Mike.
Decrypt test
Improve naming Follow up Mike's feedback: #236 (comment)
As it's not a temporary store for I/O.
Add Base64 char validation
Simplify exclude rules making it more clear they refer to package names not file paths relative to project's root.
Exclude Base64 class from Javadoc
Add a test for crypto authenticity failure
Add precondition check util
Fix C-style arrays
Those are automatic IntelliJ's proposed fixes.
Fix warnings about manual array copying
Fix warnings in NaCl
* Add a PrivateEncryptedChannel * Add an example PrivateEncryptedChannel app * Ensure the PrivateEncryptedChannelImpl prepares itself before subscribing * Add tests for the PrivateEncryptedChannelImpl prepare method * Save PrivateEncryptedChannel shared secret to the secretbox and clear when unsubscribing * PrivateEncryptedChannelImpl handle sharedSecret better * Save the auth token more securely in the PrivateEncryptedChannelImpl * Remove empty line in ChannelManager * Use Marek's base64 decode to decode the shared secret * Make the PrivateEncryptedChannelImpl error message more clear * Fix PrivateEncryptedChannelImpl raising the correct exceptions * Update the PrivateEncryptedChannelImplTest to check we're raising the correct exceptions * Add space character in Pusher.java when creating a PrivateEncryptedChannelImpl * Keep the auth token in an byte array for as long as possible in PrivateEncryptedChannelImpl * Update src/main/java/com/pusher/client/channel/PrivateEncryptedChannel.java Co-Authored-By: Marek <[email protected]> * Update src/main/java/com/pusher/client/channel/PrivateEncryptedChannelEventListener.java Co-Authored-By: Marek <[email protected]> * Refactor new pieces to fit 100 characters maxline length better * Remove rogue space character in PrivateEncrptedChanneImplTest * Remove PrivateEncryptedChannel custom method calls from the ChannelManager * Make the PrivateEncryptedChannelEventListener extend PrivateChannelEventListener * Refactor clearDownSubscription to handleAuthenticationFailure * Update src/main/java/com/pusher/client/channel/impl/PrivateEncryptedChannelImpl.java Co-Authored-By: Marek <[email protected]> * Refactor PrivateEncryptedChannelImpl prepareChannel to checkAuthentication * Refactor PrivateEncryptedChannelImplTest * Refactor PrivateEncryptedChannelImplTest titles and valid authorizer * Import Base64 util in PrivateEncryptedChannelImpl properly * Refactor Arrays.fill to fill for readability improvement * Refactor PrivateEncryptedChannelImpl to remove channelData * Don't log any secret info * Refactor unit tests for PrivateEncryptedChannelImpl to assert throws errors differently * Add private-encrypted channel name tests * Make the PrivateEncryptedChannelImplTests extend the ChannelImplTest and implement overrides * Fix PrivateEncryptedChannelImplTest for testReturnsCorrectSubscribeMessage * Fix PrivateEncryptedChannelImplTests for unsubscribing * Add Tests for SecretBoxOpener * Update AuthorizationFailureException in PrivateEncryptedChannelImpl * Update src/test/java/com/pusher/client/channel/impl/PrivateEncryptedChannelImplTest.java Co-Authored-By: Marek <[email protected]> * wip for gson deserialising * Put the PrivateEncryptedChannelImpl authoriser data back to String * Add dash to the end of ChannelManager to check for private-encrypted- * Add dash to the end of ChannelManager to check for private-encrypted- * Remove the demo apikey * Ensure getDisallowedNameExpression ends with dash * Remove unused imports and comments * Rename checkAuthentication to authenticate and make private * Use auth consistently * Add SecretBoxOpenerFactory * Make auth a String Co-authored-by: Marek <[email protected]>
Consistently tidy up PrivateEncryptedChannelImplTest
Add clearing of shared secret on disconnected
This reverts commit a87547f.
…ges get a retry to the authorization endpoint
Dev decrypt plus retry
* add some Private Encrypted Channels docs * Update Private Encrypted Channels docs * Feedback to docs * Document the example app better * Feedback on docs * Delete duplicated parts of the docs
daniellevass
commented
Apr 8, 2020
| /** | ||
| * Interface to listen to private encrypted channel events. | ||
| * Note: This needs to extend the PrivateChannelEventListener because of the ChannelManager clearDownSubscription | ||
| */ |
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.
this comment should be updated to say handleAuthenticationFailure as we refactored that method.
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.
Have updated.
mdpye
approved these changes
Apr 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
This is everything for private encrypted channels.
The PrivateEncryptedChannelExampleApp works as intended, and I have confirmed that it also works in an Android app:
todo