Skip to content

Default app policies are never updated after a PTU #1772

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

Closed
AKalinich-Luxoft opened this issue Sep 22, 2017 · 5 comments
Closed

Default app policies are never updated after a PTU #1772

AKalinich-Luxoft opened this issue Sep 22, 2017 · 5 comments
Assignees
Labels

Comments

@AKalinich-Luxoft
Copy link
Contributor

AKalinich-Luxoft commented Sep 22, 2017

Occurence:

Always

Steps to reproduce:

  1. Make sure SDL is built with default flags
  2. Start SDL and HMI
  3. Connect mobile device
  4. Register mobile application
  5. Perform Policy Table Update sequence: add new functional group for default app with some additional RPC enabled (which was disabled previously), e.g. ‘GetVehicleData’. This RPC is allowed for FULL HMI level.
  6. Activate application in order to switch it to FULL HMI level
  7. Send ‘GetVehicleData’ RPC

Expected result:

RPC is processed successfully

Actual result:

SDL responds with DISALLOWED and not sends request to HMI

Test script:

1772_update_default_section.lua

@jacobkeeler
Copy link
Contributor

Needs to be fixed for PROPRIETARY mode

  1. Add Location-1 to the functional_group list in the default app policy on the PTU server
  2. Connect test app
  3. Perform PTU (app id is not present in update)
  4. Bring test app to FULL
  5. Send GetVehicleData(gps:true)
  6. Get DISALLOWED response

The test app used is left with an outdated version of the default permissions in this case. Any new app that is connected will have the updated permissions.

@jacobkeeler
Copy link
Contributor

App policies in

  1. Local PT:
        "app_policies": {
            "default": {
                "keep_context": false,
                "steal_focus": false,
                "priority": "NONE",
                "default_hmi": "NONE",
                "groups": ["Base-4", "RemoteControl"],
		"moduleType": [
			"RADIO",
			"CLIMATE"
		]
            },
            "device": {
                "keep_context": false,
                "steal_focus": false,
                "priority": "NONE",
                "default_hmi": "NONE",
                "groups": ["DataConsent-2"]
            },
            "pre_DataConsent": {
                "keep_context": false,
                "steal_focus": false,
                "priority": "NONE",
                "default_hmi": "NONE",
                "groups": ["BaseBeforeDataConsent"]
            }
        }
  1. Policy Server:
        "app_policies": {
            "default": {
                "keep_context": false,
                "steal_focus": false,
                "priority": "NONE",
                "default_hmi": "NONE",
                "groups": ["Base-4", "Location-1"]
            },
            "device": {
                "keep_context": false,
                "steal_focus": false,
                "priority": "NONE",
                "default_hmi": "NONE",
                "groups": ["DataConsent-2"]
            },
            "pre_DataConsent": {
                "keep_context": false,
                "steal_focus": false,
                "priority": "NONE",
                "default_hmi": "NONE",
                "groups": ["BaseBeforeDataConsent"]
            }
        }

@GetmanetsIrina
Copy link

GetmanetsIrina commented Dec 15, 2017

Reproduced on SDLOpen commit 9e95f67 (develop branch)
Fix on AKalinich-Luxoft#1,
Script for reproducing https://github.com/smartdevicelink/sdl_atf_test_scripts/blob/develop/test_scripts/Defects/4_5/1772_update_default_section.lua.

Reproducing scenario:

  1. SDL is built with PROPRIETARY flag
  2. Start SDL and HMI, first ignition cycle
  3. Device is connected
  4. Register new application
  5. Perform PTU with updated default section (in script added new group in default section with GetVehicleData RPC)
  6. App sends GetVD

Expected result:
SDL performs update and sends OnPermissionsChange to mobile app with updated permissions.
DB has updated info. SDL process GetVD successfully.

@mrapitis
Copy link
Contributor

Reviewed ATF script and ran successfully. Successfully reproduced issue with provided commit. Reviewed code with and requested any changes to public methods require appropriate deprecation.

@Jack-Byrne
Copy link
Collaborator

fix merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants