Skip to content

Conversation

@mked-luxoft
Copy link
Contributor

@mked-luxoft mked-luxoft commented May 22, 2019

Implements #2791

This PR is [ready] for review.

Risk

This PR makes [minor] API changes.

Testing Plan

Summary

  • ServiceStatusUpdateHandler and ServiceStatusUpdateHandlerListener entities were introduced to provide adequate level of abstraction when passing data between ProtocolHandler, SecurityManager and ApplicationManager

  • Added handling of negative cases in GetSystemTime, PTU timeout, and certificate decryption

  • Added check for maximum allowed PTU retries for PROPRIETARY flow

Other parts of delivery:

CLA

@mked-luxoft mked-luxoft changed the base branch from release/5.1.1 to develop May 22, 2019 17:52
@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from c893ef9 to 81b4515 Compare May 27, 2019 05:48
@SNiukalov SNiukalov force-pushed the feature/service_status_update_to_hmi branch from 81b4515 to f437759 Compare May 30, 2019 07:41
@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from f437759 to 39ff0b9 Compare June 14, 2019 06:59
@mked-luxoft
Copy link
Contributor Author

@yang1070 This PR was updated to comply with proposal updates. Please review.

@mked-luxoft mked-luxoft requested a review from yang1070 June 14, 2019 13:57
Copy link

@yang1070 yang1070 left a comment

Choose a reason for hiding this comment

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

Ford has reviewed and approved this change

@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from 39ff0b9 to 8f06818 Compare July 24, 2019 14:28
@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from 8f06818 to 1bb6c99 Compare August 13, 2019 11:44
@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from 1bb6c99 to 0412161 Compare August 20, 2019 15:07
@mked-luxoft
Copy link
Contributor Author

This PR was rebased on the latest develop branch and is ready for review

@AStasiuk
Copy link

@theresalech, this PR is already reviewed and approved by Ford (by @yang1070 ) and ready for Livio review.

@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from c68887a to 9d61a18 Compare August 23, 2019 14:21
@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from e3bdcf6 to 0f5af0e Compare August 27, 2019 14:10
@jacobkeeler
Copy link
Contributor

Some cases that seem to have been missed (I'll note that I'm using the EXTERNAL_PROPRIETARY flow):

  1. If attempting to start a secured service for a type that is in ForceUnprotectedService, only OnServiceUpdate(REQUEST_RECEIVED) is sent to the HMI, whereas a OnServiceUpdate(REQUEST_REJECTED) should be sent as well.
  2. The same issue occurs when a PTU retry sequence fails, no OnServiceUpdate(REQUEST_REJECTED) is sent

@mked-luxoft
Copy link
Contributor Author

mked-luxoft commented Aug 28, 2019

Some cases that seem to have been missed (I'll note that I'm using the EXTERNAL_PROPRIETARY flow):

1. If attempting to start a secured service for a type that is in `ForceUnprotectedService`, only `OnServiceUpdate(REQUEST_RECEIVED)` is sent to the HMI, whereas a `OnServiceUpdate(REQUEST_REJECTED)` should be sent as well.

2. The same issue occurs when a PTU retry sequence fails, no `OnServiceUpdate(REQUEST_REJECTED)` is sent

@jacobkeeler , secure services with ForceUnprotectedService flag are now rejected in 23c3e5f. Atf scripts were updated as well to cover these test cases in 18295

@TinaKleczka
Copy link

This is ready for re-review. @theresalech

@jacobkeeler
Copy link
Contributor

@mked-luxoft Are you still investigating the second issue?

  1. The same issue occurs when a PTU retry sequence fails, no OnServiceUpdate(REQUEST_REJECTED) is sent

@mked-luxoft
Copy link
Contributor Author

@mked-luxoft Are you still investigating the second issue?

  1. The same issue occurs when a PTU retry sequence fails, no OnServiceUpdate(REQUEST_REJECTED) is sent

@jacobkeeler if the PTU was triggered by start of protected service with ForceUnprotectedService flag, then with current implementation SDL will reject such service without starting a PTU sequence, so this issue is also supposed to be fixed in aforementioned commit

@mked-luxoft
Copy link
Contributor Author

@mked-luxoft Are you still investigating the second issue?

  1. The same issue occurs when a PTU retry sequence fails, no OnServiceUpdate(REQUEST_REJECTED) is sent

@jacobkeeler if the PTU was triggered by start of protected service with ForceUnprotectedService flag, then with current implementation SDL will reject such service without starting a PTU sequence, so this issue is also supposed to be fixed in aforementioned commit

After communication with @jacobkeeler it became apparent that mentioned issues are two separate test cases with different preconditions.
@jacobkeeler , could you please provide answers for the following questions:

  • do you see this issue every time?
  • do you have logs from when this issue happened?
  • what type of service were you trying to start?
  • is this service ForceProtected?
  • were all ptu retry iteration finished?
  • did you receive StartServiceNAck ?

@jacobkeeler
Copy link
Contributor

jacobkeeler commented Aug 28, 2019

  • do you see this issue every time?

Yes

  • do you have logs from when this issue happened?

SmartDeviceLinkCore.log

  • what type of service were you trying to start?

Video

  • is this service ForceProtected?

ForceProtectedService and ForceUnprotectedService are both Non

  • were all ptu retry iteration finished?

It appears so

  • did you receive StartServiceNAck ?

Based on the Core logs, it doesn't appear so

@dboltovskyi
Copy link
Contributor

dboltovskyi commented Aug 28, 2019

@jacobkeeler

In case you described SDL will do the following:

  1. Try to obtain certificate through PTU
  2. Wait until PTU retry sequence finished (unsuccessfully)
  3. Try to start service in unprotected mode (since ForceProtection is OFF)
  4. Send BC.OnServiceUpdate(REQUEST_ACCEPTED, PROTECTION_DISABLED) to HMI
  5. Send StartServiceAck(encryption=false) to mobile App

Additional script has been committed recently to cover this case: smartdevicelink/sdl_atf_test_scripts@a9caceb
It's passed on a current commit of core
However we didn't observe these messages in log you provided and continue investigation

@dboltovskyi
Copy link
Contributor

@jacobkeeler One more question:
Have you used smartdevicelink/sdl_hmi#184 for testing and have you checked External Policies option on Web-HMI?

@dboltovskyi
Copy link
Contributor

@jacobkeeler We were able to reproduce the issue. It looks like it's related to HMI. Going to prepare a fix.

@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from 23c3e5f to 50a3db7 Compare August 28, 2019 20:21
@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from 50a3db7 to 41f18fa Compare August 29, 2019 17:16
@mked-luxoft
Copy link
Contributor Author

branch was rebased on latest develop

@mked-luxoft
Copy link
Contributor Author

@jacobkeeler We were able to reproduce the issue. It looks like it's related to HMI. Going to prepare a fix.

@jacobkeeler this issue fixed in web hmi in smartdevicelink/sdl_hmi@80d2477 .

@jacobkeeler
Copy link
Contributor

@mked-luxoft fix style

@mked-luxoft mked-luxoft force-pushed the feature/service_status_update_to_hmi branch from 41f18fa to 8d85b72 Compare August 29, 2019 17:33
@mked-luxoft
Copy link
Contributor Author

@mked-luxoft fix style

@jacobkeeler fixed in 8d85b72

Copy link
Contributor

@jacobkeeler jacobkeeler left a comment

Choose a reason for hiding this comment

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

Approving, waiting on Travis build before merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants