summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external/src/policy_helper.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix Cppcheck issues (#3453)Yana Chernysheva (GitHub)2020-10-011-46/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix noExplicitConstructor issue * Fix functionConst issues * Fix unusedFunction and unusedField issues * Fix redundantInitialization * Fix unreadVariable and unusedVariable issues * Fix postfixOperator issue * Fix variableScope issue * Fix invalidPrintfArgType_sint and unsignedLessThanZero issues * Fix other errors * Add changes, related to functions marked as unused * Fix new issues * Fixe review comment * Fix codestyle * Fix constParameter errors * Fix functionConst errors * Fix noExplicitConstructor, redundantInitialization errors * Fix unreadVariable errors * Fix shadowVariable error * Fix useStlAlgorithm errors * Fixe variableScope error, add FIXME comment * Fix code style * Fix compile error * Remove unsued function * Fix compile error Co-authored-by: Vladislav Semenyuk <vsemenyuk@luxoft.com>
* [SDL 0046] Implement logger abstraction (#3472)VladSemenyuk2020-09-011-33/+29
| | | | | | | | | | | | | | | | | | | | | | | | * Implement logger abstraction. Integrate it to SDL. Create one logger instance for shared libraries * Rename all logger macros. * Update src/components/application_manager/rpc_plugins/rc_rpc_plugin/src/resource_allocation_manager_impl.cc Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * Fix review comments(errors in log messages) * Fix review coments * Fix code style * Add logger variable creation to new commads * Fix review comment * Fixe review comment(class imblemtation moved to .cc file) Co-authored-by: Shobhit Adlakha <ShobhitAd@users.noreply.github.com>
* Feature/Web Engine support (#3221)Alexander Kutsan (GitHub)2020-02-271-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add ini file parameters for WebEngineSupport Issue : #3197 * Add Server WebSocket transport * Policy changes for Web Engine support Issue : #3197 * Changes in HMI_API for WebEngineSupport Issue : #3197 * Add application manager implementation for WebEngineSupport Add appropriate commands Make changes in application manager Issue : #3197 * Bug fix : Do not override message params if request setups it * Update SDD * fixup! Add application manager implementation for WebEngineSupport * fixup! Add Server WebSocket transport * Rename websocket dir to websocket_server * Rename WebSocketTransport adapter to WebSocketServerTransportAdapter * fixup! Update SDD * Fix/update app list after unregistration (#3252) * fixup! Rename WebSocketTransport adapter to WebSocketServerTransportAdapter * fixup! Rename websocket dir to websocket_server * Don't remove enabled WebEngine apps from pending apps * Rework WebEngine device ID generation * Fix build after back merge * Fix get app properties (#3258) Co-authored-by: Maksym Ked (GitHub) <41471947+mked-luxoft@users.noreply.github.com> * Remove unused vin_code variable Co-authored-by: Maksym Ked (GitHub) <41471947+mked-luxoft@users.noreply.github.com> Co-authored-by: Andriy Byzhynar (GitHub) <AByzhynar@luxoft.com> Co-authored-by: Ira Lytvynenko (GitHub) <ILytvynenko@luxoft.com> Co-authored-by: Andrii Kalinich (GitHub) <AKalinich@luxoft.com>
* Fix coverity issues (#3036)Jacob Keeler2019-09-191-1/+1
| | | | | | | | * Fix coverity issues Fixes CIDs 203808, 203807, 203806, 203804, 203803, 203802, 203800, 203798, 203797, 203795, and 203793 * Add virtual destructor
* [SDL 0173] - Read Generic Network Signal Data Implementation (#2977)Alexander Kutsan (GitHub)2019-08-301-17/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Generate policy enums from MOBILE_API Policy manager HMI level enum reorder * Add RPC vehicle data and endpoint_properties to sdl_preloaded_pt Set default version of custom vehicle data mapping * Add VehicleDataItem to policy table SQL storage implementation for VehicleDataItems Fix validation of double values in policy table Change isDouble to isNumeric during validation double values "0" should be validated as correct double value Add validation vehicle data during PTU Send in PT snapshot only version of custom VDI - During snapshot generation remove vehicle data items section - Add validation for Policy table depended on PT type Fix wrong check for vehicle data snapshot Allow empty vehicle data in PTU Change max value of string for URL from 255 to INT_MAX * Make Policy Handler forward declared to avoid high coupling * Add vehicle_info_command_params for vehicle info plugin Vehicle info params added to hmi commands * Process CustomVehicleData in GetVehicleData request * CustomVehicleDataManager implementation * Process Custom vehicle data subscriptions Refactored code. Extracted CheckFrequency to separate method in class * Check update of content of functional groups Fixes https://github.com/smartdevicelink/sdl_core/issues/2962 Add additional check for functional group content before OnPermissionChangeNotification. * rename comparing functions to make more clear their return value sense * change variable names * extra check for null values in HasNewGroups() New unit test to cover changes within functional group * Add GetPolicyConfigurationData GetPolicyCOnfigurationData Implementation * Add CustomVehicleData functionality for POLICY_EXTERNAL flow Change max value url for external policy fixes for external flow * since unti validation for the database * empty vehicle data validation * Convert data_type to VehicleDataType enum value * Validation of VehicleDataItem name and key Introduces validation of vehicle_data_item name and key validation: * they should not contain spaces; * they should not be empty or consist only spaces; * they should not contain invalid chars like '!@#$%^&*'. * Add engineOilLife to HMI_API * Remove deprecated RPC GetUrls due to major version update * Add ability to extend Smart schema with parameters Extract SMember from CObjectSchemaItem Add methods to ISchemaItem (Using composite pattern) - GetMemberSchemaItem - AddMemberSchemaItem Add implementation of VehicleDataItemSchema class Add appropriate unit tests Add creation of vehicle_data items schemes on policy event
* Feature/rpc message protection (#2951)Maksym Ked (GitHub)2019-08-291-5/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added encryption required flag to policy table. Also added RPC Encryption Manager Interface for comfortable access to policy table. * Added logic for processing RPC according to the proposal. * The permission change notification has been expanded. * Fixed UTs after implementation feature RPC message protection. * Fix multiframe issue * Fix style * Added storage of encryption required rpcs * Fix CI build * Extended logic adding encryption flag in message helper * Added permission check of encryption required for PROP * Added permission check of encryption required for EXT * Fixes after rebase * Answer PR comments - fixed typos - fixed 3rd party cmake * fixup! Added logic for processing RPC according to the proposal. * fixup! The permission change notification has been expanded. * Answer PR comments - renamed functions - added encryption_required flag to sql_pt_ext* source files - added condition and logging to CacheManager::GetApplicationParams * fixup! Added logic for processing RPC according to the proposal. * fixup! Added encryption required flag to policy table. * fixup! Added permission check of encryption required for EXT * fixup! Added permission check of encryption required for PROP * Fixes after rebase
* Run updated style scriptjacobkeeler2019-04-291-10/+10
|
* Fix unit testsjacobkeeler2018-10-031-0/+4
|
* Merge branch 'fix/allow_user_consent_for_default_groups' of ↵jacobkeeler2018-10-031-1/+3
|\ | | | | | | https://github.com/JackLivio/sdl_core into fix/allow_user_consent_for_default_groups
* | Fix issue where pending permissions were not being clearedjacobkeeler2018-10-021-2/+3
|/
* Allows User Consent for Default Functional GroupsJackLivio2018-10-011-12/+22
|
* Remove app link mentionJackLivio2018-08-171-1/+0
|
* Updated permissions calc logic according to commentsAndrii Kalinich2018-08-061-22/+21
|
* Fixed RPC parameters permission calculation according to requirementsAKalinich-Luxoft2018-07-201-21/+45
| | | | | | | | | | | | | There was a problem when application has several consented functional groups with the same RPC included. In case when some of functional groups have RPC with all parameters disallowed option, SDL ignores all allowed parameters for this RPC in other functional groups. According to AppLink Policies Manager specification SDL should perform a logical OR amongst all of the possible allowed permissions scenarios for the RPC defined by each of the functional groups. Current logic was updated to fit this requirement.
* Replace utils::SharedPtr with std::shared_ptr, remove non-standard usageConlain Kelly2018-07-181-2/+2
|
* Remove redundant enum and update logic accordinglyAndriy Byzhynar2018-05-301-25/+3
|
* Fix code according to review commentsIryna Lytvynenko2018-05-241-24/+15
| | | | | Removed redundant block Added missed expecation in unit test
* Implement external proprietary policy for expandable designAndriy Byzhynar2018-05-241-9/+80
| | | | | Implemented support of expandable design for EXTERNAL_PROPRIETARY policy flow
* Add apropriate logging in policy flowAlex Kutsan2018-03-281-3/+3
|
* Fix PTU applying for default app policy sectionAKalinich-Luxoft2017-09-271-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | There was a problem with applying changes for applications which is registered with "default" policies and this policy group was updated after PTU. In this case permissions for already registered applications which is using these groups still have permissions as before update. Also default policy section was not updated after PTU with changes in this section. This issue is reproduced on EXTERNAL_PROPRIETARY flow only. To fix this issue there was removed code in CacheManager, which incorrectly assigns default policies to apps with "default" policies. Also there was a redundant code because default policies is unwrapped in PTU before its applying, so all specific application policies is already have actual new default policy permissions. In this case it is correct to assign to every app his own policies from PTU. Also there was updated logic in ProcessAppPolicyCheckResults() to perform all needed actions once per app, because its possible that results could contain sever results for one app_id.
* Remove unused HaveGroupsChanged functionAlexander Kutsan2017-09-051-24/+0
|
* Remove unused and redundant code from policyAndriy Byzhynar2017-08-301-9/+0
|
* Remove Promary RC groupAlexander Kutsan2017-08-221-9/+0
|
* Removes 'groups_nonPrimaryRC' supportAndrey Oleynik2017-08-211-6/+0
|
* Implementation of Remote Control pluginAlexander Kutsan2017-08-161-0/+49
| | | | | | Stype changes after integration Fix policy handler remote unit tests
* New fix for CID 171125, 171127, and 171128jacobkeeler2017-06-221-33/+31
| | | Removed the rpc_hmi_permissions and rpc_parameter_permissions variables and used the rpc accessors instead. Otherwise comparisons were being made from iterators made from two different variables
* Fix for coverity issues 171128, 171127, 171125JackLivio2017-06-191-3/+3
| | | | Removed const iterator since the permissions it is compared to is not a const object.
* Fix SDL does not send OnPermissionsChange after PTUIra Lytvynenko2017-05-171-1/+1
|
* Adds draft business logic for 'CCS ON' case and unit testAndrey Oleynik2017-05-171-43/+17
|
* Renames policy_premium folder to policy_externalAndrey Oleynik2016-12-051-0/+896
|
* remove policy submoduleJustin Dickow2014-10-271-0/+0
| | | | Signed-off-by: Justin Dickow <jjdickow@gmail.com>
* SDL 3.8!Justin Dickow2014-10-201-0/+0
Signed-off-by: Justin Dickow <jjdickow@gmail.com>