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

Implement SDL-0207 RPC Message Protection #1320

Conversation

SatbirTanda
Copy link
Contributor

@SatbirTanda SatbirTanda commented Jun 25, 2019

Implements #1163

This PR is ready for review.

Risk

This PR makes minor API changes.

Testing Plan

Add unit tests

Summary

Add a public payloadProtected property to RPC Messages. Also automatically check the requireEncryption flag of RPC being sent in the sendRPC method on SDLManager for automatically handling encryption if needed.

CLA

Update SDLOnPermissionsChangeSpec & SDLPermissionItemSpec & SDLResultSpec
Also handles auto-matically encrypting RPCs if sent in the sendRPC method where the permssionManager can check the requireEncryption flag
Check permissions in O(1) time
Properly add new files
Make SDLEncryptionConfiguration.h public
@joeljfischer joeljfischer added proposal Accepted SDL Evolution Proposal enhancement labels Jun 26, 2019
@NicoleYarroch NicoleYarroch added this to the Future milestone Jun 26, 2019
@NicoleYarroch NicoleYarroch added this to In progress in v6.4 via automation Jun 26, 2019
@SatbirTanda SatbirTanda changed the base branch from master to develop July 2, 2019 22:40
@joeljfischer joeljfischer self-requested a review July 9, 2019 18:08
SmartDeviceLink/SDLEncryptionManager.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLEncryptionLifecycleManager.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLProxy.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLProxy.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLProxy.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLProxy.m Outdated Show resolved Hide resolved
v6.4 automation moved this from In progress to Review in progress Jul 9, 2019
Deprecate initializers in SDLStreamingMediaConfig
Add security manager to SDLStreamingMediaConfig after SDLEncryptionConfig has been initialized.
Add flag to SDLAsynchronousRPCRequestOperation
@joeljfischer joeljfischer changed the title Implement RPC message protection Implement SDL-0207 RPC Message Protection Jul 15, 2019
@theresalech
Copy link
Contributor

theresalech commented Jul 15, 2019

@SatbirTanda can you please advise when this is ready for re-review? It looks like there are still items to be addressed.

@SatbirTanda
Copy link
Contributor Author

@theresalech ready for review

Copy link
Contributor

@NicoleYarroch NicoleYarroch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

SmartDeviceLink/SDLLifecycleManager.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLLifecycleManager.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLEncryptionLifecycleManager.m Outdated Show resolved Hide resolved
@NicoleYarroch
Copy link
Contributor

@NicoleYarroch I disagree with If the encryption lifecycle manager fails to setup the encrypted service, the manager should retry the encrypted service one more time before failing. The Audio and Video manager do not attempt to retry starting a secure service, there is no need to. It would be making the same request twice, there is not really a timing issue here. In the case for the proxy transport connect it seems necessary because of the nature of iAP / TCP.

A new proposal will be submitted to handle this case for the next release

@jordynmackool
Copy link
Contributor

@SatbirTanda Please see the powerpoint attached from our alignment meeting on 2019-09-10.

Livio Feedback 2019-09-10; RPC Message Protection.pdf

Expose SDLProtocolConstants.h and SDLServiceEncryptionDelegate.h
Append sdl_ to private methods
Add delegate callback in endservice ACK and NACK methods
Pass in SDLRPCMessage instead of functionID
@SatbirTanda
Copy link
Contributor Author

@theresalech ready for review

Copy link
Contributor

@NicoleYarroch NicoleYarroch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing went well. I found one issue that I elaborated on in the comments.

SmartDeviceLink/SDLPermissionManager.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLEncryptionLifecycleManager.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLError.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLErrorConstants.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLError.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLPermissionManager.m Show resolved Hide resolved
SmartDeviceLink/SDLLifecycleManager.m Show resolved Hide resolved
@SatbirTanda
Copy link
Contributor Author

@theresalech ready for review

@SatbirTanda
Copy link
Contributor Author

@theresalech ready for review

Copy link
Contributor

@NicoleYarroch NicoleYarroch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes

SmartDeviceLink/SDLStreamingMediaConfiguration.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLStreamingMediaConfiguration.h Outdated Show resolved Hide resolved
SmartDeviceLink/SDLEncryptionLifecycleManager.m Outdated Show resolved Hide resolved
SmartDeviceLink/SDLPermissionManager.m Show resolved Hide resolved
@SatbirTanda
Copy link
Contributor Author

@theresalech ready for review

Copy link
Contributor

@NicoleYarroch NicoleYarroch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor SDLPermissionsManagerSpec test case fixes needed.

@SatbirTanda
Copy link
Contributor Author

@theresalech ready for review

@joeljfischer joeljfischer merged commit af56e0a into smartdevicelink:develop Oct 10, 2019
v6.4 automation moved this from Review in progress to Done Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Accepted SDL Evolution Proposal
Projects
No open projects
v6.4
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants