platform/core/test/security-tests.git
5 years agoMerge branches 'ckm', 'security-manager' and 'cynara' into 'tizen' 29/200729/2
Krzysztof Jackiewicz [Mon, 4 Mar 2019 09:13:17 +0000 (10:13 +0100)]
Merge branches 'ckm', 'security-manager' and 'cynara' into 'tizen'

This merge is necessary to introduce common changes to onlycap handling in a
following commit.

Change-Id: I78a26f9d4820067fca2f0bcc2ab7ce96f5d4e4e4

5 years agoCKM: Use proper application label prefix 05/200705/2
Krzysztof Jackiewicz [Thu, 28 Feb 2019 13:04:19 +0000 (14:04 +0100)]
CKM: Use proper application label prefix

Change-Id: I52452360de85dd550384ec109a4083ec4e6ff489

5 years agoReplace CKMErrorToString with APICodeToString 30/200230/7
Tomasz Swierczek [Wed, 20 Feb 2019 09:28:40 +0000 (10:28 +0100)]
Replace CKMErrorToString with APICodeToString

CKMErrorToString is not needed as key-manager just gained
almost exactly the same functionality in its ckm-error.h file.

Change-Id: I4150246e4779b7ec4a03e43eef38ec5593159f8e

5 years agoCKM: Add tests for new API: list alias with information about password protection 23/186023/6
Ernest Borowski [Fri, 23 Feb 2018 13:38:41 +0000 (14:38 +0100)]
CKM: Add tests for new API: list alias with information about password protection

Change-Id: Iae18e91e1a3335cd5ca55811d0edbfd98eee59c6
Signed-off-by: Ernest Borowski <e.borowski@partner.samsung.com>
5 years agoAdd sd-bus cynara API tests 08/191708/4
Monika Zielinska [Wed, 31 Oct 2018 08:44:45 +0000 (09:44 +0100)]
Add sd-bus cynara API tests

Change-Id: Ice5413156be6bd239be0898a5577b7f9ad6efcf7

5 years agoCKM: Extend encrypted initial values test 26/192126/7
Krzysztof Jackiewicz [Mon, 29 Oct 2018 15:54:27 +0000 (16:54 +0100)]
CKM: Extend encrypted initial values test

- Make it independent from other tests by adding initial values xml preparation,
  key-manager restart and db cleanup.
- Generate initial values at build time using ckm_initial_values tool.
- Install the tested xml file in test directory and copy it to initial values
  dir during the test instead of installing it there directly.
- Encrypt the test data using openssl and the same key that is passed as initial
  value during compilation instead of hardcoding the encryption results.
- Add build time dependency to util-linux to be able to use hexdump.
- Add build time dependency to key-manager-initial-values to be able to run the
  tool.

Change-Id: I7fe4be6a3493860244ac1cc1c0bb0dace5109a04

5 years agoAdd gbs option to enable the TZ backend support
Pawel Kowalski [Wed, 28 Nov 2018 10:51:13 +0000 (11:51 +0100)]
Add gbs option to enable the TZ backend support

To enable the TZ backend support add following option to the gbs build:
--define "tz_backend ON". If the option is not set or is set to value
different than ON, the TZ backend support is disabled (it is disabled by
default).
When the TZ backend is disabled, some tests (T6* and T7*) are not built.

The same option has been added to the key-manager (branch tizen).

The key-manager-ta requires the following gbs option for these tests to
work properly: --define "test_key ON".

Change-Id: If1c27d8ae556f6882f65c4ace8bb4c1759656893

5 years agoEncrypted initial values test 23/191023/4
Bartlomiej Grzelewski [Wed, 10 Oct 2018 13:02:46 +0000 (15:02 +0200)]
Encrypted initial values test

To use this test you must:
 * turn on tz_backend_enabled value in key-manager spec file
 * turn on attach_test_key value in key-manager-ta spec file
 * restart central-key-manager after security-tests installation

Change-Id: I2238bbc886fa33d6cad2f155f122a30cf35404b5

5 years agoAdjust tests to security-manager changes 26/189226/3
Dariusz Michaluk [Fri, 14 Sep 2018 10:31:51 +0000 (12:31 +0200)]
Adjust tests to security-manager changes

This commit fix tests after introducing below change:
https://review.tizen.org/gerrit/#/c/186449

Change-Id: I362e7fb774246f632f1c5d5ce6cca937b9703aae

5 years agoWorkaround failed tests after privilege-checker changes 80/189680/2
Dariusz Michaluk [Wed, 19 Sep 2018 11:48:13 +0000 (13:48 +0200)]
Workaround failed tests after privilege-checker changes

This ugly commit temporarily workaround failed tests after introducing below change:
https://review.tizen.org/gerrit/#/c/174356/

In the future, this can be replaced probably by pkgmgr-info API:
pkgmgr_parser_process_usr_manifest_x_for_installation(manifest_x* mfx, uid_t uid);
pkgmgr_parser_process_usr_manifest_x_for_uninstallation(manifest_x* mfx, uid_t uid);

Change-Id: Ia0b48c090073388bced0029aeb7180609a0798dc

5 years agoDrop TemporaryTestUser copy constructor 54/183654/3
Konrad Lipinski [Mon, 9 Jul 2018 12:47:04 +0000 (14:47 +0200)]
Drop TemporaryTestUser copy constructor

Change-Id: Ic0dddc554c809d7d4d46f49cfe51d42a4793b359

5 years agoMake spec compliant with gbs --incremental 52/183552/1
Konrad Lipinski [Fri, 6 Jul 2018 11:04:54 +0000 (13:04 +0200)]
Make spec compliant with gbs --incremental

According to [1], %prep section of the spec file should contain a single
%setup macro, nothing else. According to [2], manifest files are best
copied to %{buildroot}%{_datadir} in the %install section.

Moved manifest copy operations from %prep to %install accordingly.

References
[1] https://source.tizen.org/documentation/reference/git-build-system/usage/gbs-build
[2] https://wiki.tizen.org/Security/Application_installation_and_Manifest

Change-Id: I9e7385bf6074346f3fd401b7bc9af878c0825fbf

5 years agoAdd test to check if hybrid app is properly uninstalled 22/182222/1
Tomasz Swierczek [Thu, 21 Jun 2018 08:05:38 +0000 (10:05 +0200)]
Add test to check if hybrid app is properly uninstalled

Change-Id: Iaf26ee386ca09294ef6a38683ef3d8aa3b76f3d6

5 years agoMake cynara-test do not require partition RW remount 51/178351/6
akoszewski [Fri, 20 Apr 2018 14:59:35 +0000 (16:59 +0200)]
Make cynara-test do not require partition RW remount

Change-Id: I988b4de06217fd5a34548e1efb5a609baa859cc6

5 years agoFix typo in the test group name 29/180029/1
Pawel Kowalski [Thu, 24 May 2018 08:57:15 +0000 (10:57 +0200)]
Fix typo in the test group name

Change-Id: Icec1b57f92f390cf1f18c3dd8352de60a829eb22

6 years agoAdjust tests to security-manager API changes 32/179232/1
Dariusz Michaluk [Wed, 16 May 2018 10:23:33 +0000 (12:23 +0200)]
Adjust tests to security-manager API changes

Change-Id: I807e00c96a22a5aed06dcebddc5402ff0b696d2c

6 years agoMerge branch 'tizen' into cynara 07/178007/1
Dariusz Michaluk [Mon, 7 May 2018 09:36:08 +0000 (11:36 +0200)]
Merge branch 'tizen' into cynara

Change-Id: I64b5d9579b92d7f09dd62979b7ed6e0f9c0d5f1f

6 years agoMerge branch 'tizen' into security-manager 04/178004/1
Dariusz Michaluk [Mon, 7 May 2018 08:48:29 +0000 (10:48 +0200)]
Merge branch 'tizen' into security-manager

Change-Id: I8aff6f1193ac928ed36593d5f2e3f560ccfb6da6

6 years agoMerge branch 'ckm' into tizen 02/178002/1
Dariusz Michaluk [Mon, 7 May 2018 08:37:26 +0000 (10:37 +0200)]
Merge branch 'ckm' into tizen

Change-Id: I96b738bb76659cbd11a6b110c6173378d476fffd

6 years agoAdjust tests to allow change of hybrid flag 48/174148/6
Pawel Kowalski [Wed, 28 Mar 2018 12:08:59 +0000 (14:08 +0200)]
Adjust tests to allow change of hybrid flag

Change-Id: I37f387e79a07cf1a5b16d673693d01c3932b781b

6 years agoAdd cleanupApp() helper. It should be called after app termination. 43/172543/1
Dariusz Michaluk [Wed, 14 Mar 2018 10:07:32 +0000 (11:07 +0100)]
Add cleanupApp() helper. It should be called after app termination.

Change-Id: I8664aca14bce9f6c7146a68d512ec830d5763942

6 years agoFix: Add openssl build dependency 44/171844/1
Dariusz Michaluk [Wed, 7 Mar 2018 14:21:30 +0000 (15:21 +0100)]
Fix: Add openssl build dependency

Change-Id: I392010fe9aec122bb4d829618cf60b7383a780ce

6 years agoAdjust get_manifest_policy tests to new implementation 23/171323/2
Tomasz Swierczek [Thu, 1 Mar 2018 07:27:59 +0000 (08:27 +0100)]
Adjust get_manifest_policy tests to new implementation

New implememtation allows apps to check their own policy.

Change-Id: I2c36054424479f3507e424726e82fa8be8b857f0

6 years agoAdditional test cases for paths check 01/168501/3
Tomasz Świerczek [Mon, 29 Jan 2018 05:58:19 +0000 (06:58 +0100)]
Additional test cases for paths check

* SM should accept paths with "./" and "../" in them, it explicitly uses realpath

Change-Id: I099155a23ab5bf2a8b683ccb5e12b64fde783066

6 years agoAdded tests for security_manager_get_app_manifest_policy() API call 16/170516/3
Tomasz Swierczek [Fri, 16 Feb 2018 13:13:40 +0000 (14:13 +0100)]
Added tests for security_manager_get_app_manifest_policy() API call

Change-Id: If04e0e560d2c9a6a91b880a754d871edfdc13f08

6 years agoCKM: Replace expired Facebook certificate 33/169833/1
Krzysztof Jackiewicz [Fri, 9 Feb 2018 13:10:05 +0000 (14:10 +0100)]
CKM: Replace expired Facebook certificate

Change-Id: I35c851c457a82e13ae470b66436f25d1971e2511

6 years agoCKM: Check certificate validity before test 32/169832/1
Krzysztof Jackiewicz [Fri, 9 Feb 2018 12:18:53 +0000 (13:18 +0100)]
CKM: Check certificate validity before test

When a certificate expires or a systemd date is incorrectly set the certificate
chain tests fail suggesting key-manager failure.

This commit adds a simple certificate validity check before the certificate is
used. If the certificate is not valid the test fails and a clear message is
delivered to the user. Each certificate is validated only once.

Change-Id: I4de5549e49b761472c224f6bb672d512386d398d

6 years agoAdjust tests to use more detailed error codes 53/157853/9
Pawel Kowalski [Thu, 26 Oct 2017 11:10:33 +0000 (13:10 +0200)]
Adjust tests to use more detailed error codes

There was no distinction between different types of errors returned
by OpenSSL functions in the CKM. After improvement, in some cases,
INVALID_PARAM is returned instead of generic SERVER_ERROR. Some tests
concerning decryption and encryption had to be adjusted.

Change-Id: I23aee248aa4fbcfe02f878c629c9b8595642e2da

6 years agosecurity-manager: fix tests related to privacy privileges 51/168851/5
Rafal Krypa [Wed, 17 Jan 2018 17:23:30 +0000 (18:23 +0100)]
security-manager: fix tests related to privacy privileges

When application is registered in security-manager with privileges
that should be set as privacy, it is required to first register the
app in security-privilege-manager. Otherwise, when security-manager
checks if a privilege is privacy, it will always see privileges as
non-privacy.

This patch fixes the following tests:
- security_manager_ap1_app_policy_fetch_for_self
- security_manager_18_privacy_manager_privacy_related_privileges_policy_install_remove
- security_manager_19a_privacy_manager_privacy_related_privileges_policy_hybrid
- security_manager_19b_privacy_manager_privacy_related_privileges_policy_no_hybrid
- security_manager_20_privacy_manager_privacy_related_privileges_policy_admin_check

Change-Id: I34ec671f02a42e175ecbd53c428d17fcee65e909
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
6 years agoCKM: Prevent running tests as wrong user 21/168321/5
Krzysztof Jackiewicz [Thu, 25 Jan 2018 16:02:35 +0000 (17:02 +0100)]
CKM: Prevent running tests as wrong user

Abort if ckm-tests are launched as user != owner
Abort if ckm-privileged-tests are launched as user != root
Update security-tests-all.sh to use proper user
Add ckm-privileged-tests to security-tests.sh
Add missing license boilerplate

Change-Id: Id4929d3c4266e4abe7e8ea89238fe72195b73081

6 years agoRemove unnecessary Smack exec labels 97/168997/1
Krzysztof Jackiewicz [Tue, 30 Jan 2018 09:32:42 +0000 (10:32 +0100)]
Remove unnecessary Smack exec labels

Change-Id: Ice7980a4415863acce37ec90dc9aa6edcf34ec9a

6 years agoCKM: Restore label & onlycap after privileged tests 14/168414/3
Krzysztof Jackiewicz [Fri, 26 Jan 2018 09:32:27 +0000 (10:32 +0100)]
CKM: Restore label & onlycap after privileged tests

Change-Id: I8ee1dee9d8765f804f29de0df090bfa78ab582b6

6 years agoAdjust security_manager_101_create_namespace_test 27/168427/1
Dariusz Michaluk [Fri, 26 Jan 2018 11:56:45 +0000 (12:56 +0100)]
Adjust security_manager_101_create_namespace_test

App smack label replace app name.

Change-Id: Icf2bfa9545e28f09fe23df9870092d3f945d47bf

6 years agoSM : Add tests for external paths of application 83/162483/1
Zofia Abramowska [Fri, 20 Oct 2017 14:51:23 +0000 (16:51 +0200)]
SM : Add tests for external paths of application

Change-Id: If20436654fca450881c8504984ea4501cc4b62b7

6 years agoMerge branch 'tizen' into security-manager 82/162482/1
Zofia Grzelewska [Fri, 1 Dec 2017 16:21:37 +0000 (17:21 +0100)]
Merge branch 'tizen' into security-manager

Change-Id: If8ea6d9e0dcfbe8bd530f31f262226dd434117a5

6 years agoAdjust tests to use proper backends for tests 24/162224/3
Tomasz Swierczek [Wed, 29 Nov 2017 17:59:38 +0000 (18:59 +0100)]
Adjust tests to use proper backends for tests

Change-Id: I979a4285f252c166d56fd08c5a514b78d9460138

6 years agoReplace Yahoo certificate with Bing 36/158736/3
Bartlomiej Grzelewski [Thu, 2 Nov 2017 14:14:39 +0000 (15:14 +0100)]
Replace Yahoo certificate with Bing

Yahoo certificate used in test expires.
Bing certificates are valid longer than yahoo ones.

Change-Id: I993b048e118bb6627c789e69511d2861551b4776

6 years agoSupport more types of application paths 85/158085/3
Zofia Abramowska [Fri, 20 Oct 2017 14:50:04 +0000 (16:50 +0200)]
Support more types of application paths

Add different root types of application:
EXTENDED and SKEL.
This is connected with places, where application
can put its own files.

Change-Id: I123206ac50d779f8f557067e18b43753101b4c5e

6 years agoSM : Adjust to new path handling 31/156931/2
Zofia Abramowska [Fri, 20 Oct 2017 14:12:25 +0000 (16:12 +0200)]
SM : Adjust to new path handling

Error returned when path is outside legal paths application
has changed. Also minor changes in logic resulted in different
error value when wrong uid is passed.

Change-Id: I24db386013cf8c82d511a4311c47701f70349bf6

6 years agoAdd security_manager_prepare_app() tests 08/142608/9
Dariusz Michaluk [Wed, 2 Aug 2017 10:50:08 +0000 (12:50 +0200)]
Add security_manager_prepare_app() tests

Check app running in mount namespace.

Change-Id: I4577197ea3f10f714c67619e371ebdf75a08979a

6 years agoMerge branch 'security-manager' into tizen 30/156730/1
Zofia Abramowska [Thu, 19 Oct 2017 16:57:08 +0000 (18:57 +0200)]
Merge branch 'security-manager' into tizen

Change-Id: I59af714f504f23c49c9fd7111afd1d4ff62bbd04

6 years agoMove scoped installer to commons 24/156724/1
Zofia Abramowska [Thu, 19 Oct 2017 15:43:21 +0000 (17:43 +0200)]
Move scoped installer to commons

Change-Id: Ica11bbb06be6eeecf2377e142b2fb89ef8b82222

6 years agoMerge branch 'tizen' into security-manager 23/156723/1
Zofia Abramowska [Thu, 19 Oct 2017 15:39:54 +0000 (17:39 +0200)]
Merge branch 'tizen' into security-manager

Change-Id: I3fa314322c8005c432cbdcfca15043d3679622b9

6 years agoFix missing dependency to tzplatform-config in commons 22/156722/1
Zofia Abramowska [Thu, 19 Oct 2017 15:35:36 +0000 (17:35 +0200)]
Fix missing dependency to tzplatform-config in commons

Change-Id: Ie898f84c7058a6da76a3ccbb0295db574451489c

6 years agoFix multiple definitions of runInChild 21/156521/1
Zofia Abramowska [Wed, 18 Oct 2017 14:58:38 +0000 (16:58 +0200)]
Fix multiple definitions of runInChild

security-manager tests and cynara-tests both have
runInChild defined. This should be moved to tests
commons, so there would be no conflict in future.

Change-Id: I28b2ebf1b2d02ccb8a483f741b0a701bf46303b1

6 years agoFix security_manager_100_synchronize_credentials_test. 21/141821/6
Dariusz Michaluk [Tue, 1 Aug 2017 12:31:23 +0000 (14:31 +0200)]
Fix security_manager_100_synchronize_credentials_test.

Launcher security attributes (user, group, capabilities)
should be set before calling security_manager_prepare_app().

Change-Id: I38680bec6873e6b3ac51dbc4c2c2dbadbb62e307

6 years agoFix access to security_test_user directory. 33/155933/1
Dariusz Michaluk [Mon, 16 Oct 2017 12:06:52 +0000 (14:06 +0200)]
Fix access to security_test_user directory.

Change-Id: I0fbb57bae137d4d2c7804b9f5151c6a8ff8697a7

6 years agoMerge branch 'security-manager' into tizen 81/155581/1
Zofia Abramowska [Fri, 13 Oct 2017 15:13:58 +0000 (17:13 +0200)]
Merge branch 'security-manager' into tizen

Change-Id: I4567f7cb3ea9713125ba7afd799aa17d0f634aaf

6 years agoMove scoped installer to global commons 46/148746/2
Zofia Abramowska [Thu, 7 Sep 2017 15:01:49 +0000 (17:01 +0200)]
Move scoped installer to global commons

Change-Id: I9effa1a4cb6669f591d8d6ab7d2c39a1e6a7ba32

6 years agoMove label generation to global commons 45/148745/2
Zofia Abramowska [Thu, 7 Sep 2017 14:47:20 +0000 (16:47 +0200)]
Move label generation to global commons

Change-Id: Ic38d65e29394dc5b8e784a8af6b105460e52a259

6 years agoChanged returned error code from setPermission 68/147768/2
Tomasz Swierczek [Tue, 5 Sep 2017 12:35:54 +0000 (14:35 +0200)]
Changed returned error code from setPermission

Change-Id: I5d143aa16c2a862f915489ee95de28e10d248330

6 years agoIgnore security_manager_shm_open() tests 96/143096/1
Dariusz Michaluk [Tue, 8 Aug 2017 11:20:30 +0000 (13:20 +0200)]
Ignore security_manager_shm_open() tests

Tests can be re-enabled after below commit merge.
https://review.tizen.org/gerrit/#/c/103763/

Change-Id: I6a7fd3d5d8aa87df76df63b3a2a7b46df6b0176b

6 years agoSM : Check if askuser is disabled in app policy tests 62/143062/2
Zofia Abramowska [Tue, 8 Aug 2017 09:13:46 +0000 (11:13 +0200)]
SM : Check if askuser is disabled in app policy tests

Change-Id: I2148b8eccddd561ac2514ab10348b885f2fdc48d

6 years agoSM : Count privacy privileges in app policy tests 61/143061/2
Zofia Abramowska [Tue, 8 Aug 2017 08:13:06 +0000 (10:13 +0200)]
SM : Count privacy privileges in app policy tests

Change-Id: I161a7975237cbec143065dacbbae9a90f8e1d2e5

6 years agoMerge branch 'tizen' into ckm 47/140947/1
Dariusz Michaluk [Thu, 27 Jul 2017 07:59:39 +0000 (09:59 +0200)]
Merge branch 'tizen' into ckm

Change-Id: I31f728750c8e888cd439e0d591621aaa20b0a936

6 years agoMerge branch 'tizen' into cynara 46/140946/1
Dariusz Michaluk [Thu, 27 Jul 2017 07:55:04 +0000 (09:55 +0200)]
Merge branch 'tizen' into cynara

Change-Id: I0d1857cce0bfb64c4a821da264cb3e01ea8be3dc

6 years agoMerge branch 'security-manager' into tizen 45/140945/1
Dariusz Michaluk [Thu, 27 Jul 2017 07:48:57 +0000 (09:48 +0200)]
Merge branch 'security-manager' into tizen

Change-Id: I0c4c3d88c5a267aa1bbad3b0a9882abf5d256d25

6 years agoAdd tests for app fetching it's own policy 41/137141/4
Zofia Abramowska [Tue, 4 Jul 2017 13:16:46 +0000 (15:16 +0200)]
Add tests for app fetching it's own policy

Change-Id: I3428d9d47f30de5fb38e7d56eac8988d88cb902a

6 years agoCKM: Test for different sign/verify params 83/137083/3
Krzysztof Jackiewicz [Tue, 4 Jul 2017 09:45:36 +0000 (11:45 +0200)]
CKM: Test for different sign/verify params

Test valid and invalid combinations of padding, hash function and message
length for functions ckmc_create_signature and ckmc_verify_signature.

Change-Id: I2133c3cb8996c5280b33230040959fa430d1b528

6 years agosecurity-manager: adapt to new API of security_manager_groups_get() 88/137788/1
Rafal Krypa [Fri, 7 Jul 2017 15:41:37 +0000 (17:41 +0200)]
security-manager: adapt to new API of security_manager_groups_get()

Function security_manager_groups_get() now returns array of gid_t instead
of array of strings.
Function security_manager_groups_free() has been dropped, group arrays
are now freed by plain free().

Change-Id: If7dc713d75f9cf0e7ff03b6b388bb9006512fe54

6 years agoFix missing includes from test_runner 40/137140/1
Zofia Abramowska [Tue, 4 Jul 2017 13:17:16 +0000 (15:17 +0200)]
Fix missing includes from test_runner

Change-Id: I6d2ee7ba2825132f338e6d349fcc4ab17a727b2c

6 years agoInclude pkg_id in certificate CN entry 58/134458/1
Dariusz Michaluk [Fri, 16 Jun 2017 14:36:48 +0000 (16:36 +0200)]
Include pkg_id in certificate CN entry

Add test to verify stolen certificate.

Change-Id: Iab128a7d0a08f3215395f7182299ea28a70f8f74

6 years agoCheck returned code if data were not found 71/133271/2
Bartlomiej Grzelewski [Mon, 5 Jun 2017 16:27:41 +0000 (18:27 +0200)]
Check returned code if data were not found

Security-manager should inform client with code
SECURITY_MANAGER_ERROR_NO_SUCH_OBJECT that data
were not found.

Change-Id: I821880eb96e78d16db4a3ce455021dda20053043

6 years agoLocal application always hides global one 23/132223/2
Bartlomiej Grzelewski [Thu, 1 Jun 2017 13:56:24 +0000 (15:56 +0200)]
Local application always hides global one

Change-Id: I90ff98da6e41dab6522f97f03bd46803fb0b26a3

6 years agoAdd additional parameter to security_manager_get_client_privilege_license 59/131959/4
Bartlomiej Grzelewski [Tue, 30 May 2017 18:10:06 +0000 (20:10 +0200)]
Add additional parameter to security_manager_get_client_privilege_license

Change-Id: I1151db20ad44ae64a5312d8307404cc2f7fa3b57

6 years agoAdjust app defined privileges tests to license-manager changes 26/130526/9
Dariusz Michaluk [Mon, 22 May 2017 15:29:33 +0000 (17:29 +0200)]
Adjust app defined privileges tests to license-manager changes

Change-Id: I3b478b4e418e3df46e194cd13ec9524a57ab1d13

7 years agoMerge remote-tracking branch 'tizen/appdefined' into security-manager 56/129656/1
Bartlomiej Grzelewski [Wed, 17 May 2017 09:49:01 +0000 (11:49 +0200)]
Merge remote-tracking branch 'tizen/appdefined' into security-manager

Change-Id: I022e5423a4755cb4d25ab909c436a4121a54175a

7 years agoMerge branch 'tizen' into ckm 35/129635/1
Piotr Sawicki [Wed, 17 May 2017 08:09:38 +0000 (10:09 +0200)]
Merge branch 'tizen' into ckm

Change-Id: Ia41b08bee4b8f23f8e6dbf50f6fae1baf38eeb65

7 years agoTest app defined privilege collision with system privileges 41/129241/2 appdefined
Dariusz Michaluk [Mon, 15 May 2017 13:58:18 +0000 (15:58 +0200)]
Test app defined privilege collision with system privileges

Change-Id: I17c140ed20acf2f66d00031eca257cfd0be8c9d9

7 years agoReplace std::string with Privilege class 49/129249/5
Bartlomiej Grzelewski [Mon, 15 May 2017 15:07:41 +0000 (17:07 +0200)]
Replace std::string with Privilege class

New privileges (LICENSED/UNTRUSTED) needs to store
addtional information. Using pair of privilege and
license started to be confusing and requires a lot
of conversions. Privilege hides additional information
inside class that makes test more readable.

Change-Id: Ie5fd90e1a8077b7de1521ab1702905d7c7281eb2

7 years agoFix failing tc03_cynara_check_invalid_params test 33/128633/2
Radoslaw Bartosiak [Wed, 10 May 2017 16:34:43 +0000 (18:34 +0200)]
Fix failing tc03_cynara_check_invalid_params test

Removed initialization of std::string from nullptr (undefined behaviour)
by function overloading - new version takes const char* args.

Change-Id: I62d3c0b00dcfba6fe2f1acb1e752dae5f4dca961
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoFix and update manifest file 32/128632/2
Radoslaw Bartosiak [Wed, 10 May 2017 14:03:42 +0000 (16:03 +0200)]
Fix and update manifest file

- Remove setting exec_label for removed files:
-- /usr/bin/tests-summary.sh
- Fix file name in the manifest (cynara-test)
- Replace the exec_label "_" with "System:::Privileged"
- Add exec_label "System::Privileged" for yaca-test
- Put files in both groups in alphabetical order

Change-Id: I61a48bfe5dc536c2e49b59e77f78cbadb5dc8748
Signed-off-by: Radoslaw Bartosiak <r.bartosiak@samsung.com>
7 years agoAdd security_manager_get_client_privilege_license() tests 22/129022/2
Dariusz Michaluk [Fri, 12 May 2017 07:22:24 +0000 (09:22 +0200)]
Add security_manager_get_client_privilege_license() tests

Change-Id: I4270f58a8731010593c097252370b98200798edf

7 years agoAdd security_manager_get_app_defined_privilege_license() tests 06/128806/4
Dariusz Michaluk [Thu, 11 May 2017 11:28:46 +0000 (13:28 +0200)]
Add security_manager_get_app_defined_privilege_license() tests

Change-Id: I06dd2f8f0b6d8f501e69f7fa7c4289f07bd895c3

7 years agoAdjust tests to API change 30/128330/4
Dariusz Michaluk [Mon, 8 May 2017 17:24:45 +0000 (19:24 +0200)]
Adjust tests to API change

Change-Id: I80bf8674e371793af0ba28db57e35bb10e69520f

7 years agoMerge remote-tracking branch 'tizen/security-manager' into appdefined 83/126683/1
Bartlomiej Grzelewski [Mon, 24 Apr 2017 16:20:32 +0000 (18:20 +0200)]
Merge remote-tracking branch 'tizen/security-manager' into appdefined

Change-Id: I430ce5badf02a457c2f1dac9b3871d6e2ae3c65c

7 years agoMerge branch 'tizen' into security-manager 43/126443/1
Dariusz Michaluk [Fri, 21 Apr 2017 11:21:16 +0000 (13:21 +0200)]
Merge branch 'tizen' into security-manager

Change-Id: I7eaf08fb9052a738be0ed4d584e6eba53fe53f88

7 years agoMerge branch 'tizen' into cynara 31/126431/2
Dariusz Michaluk [Fri, 21 Apr 2017 11:17:26 +0000 (13:17 +0200)]
Merge branch 'tizen' into cynara

Change-Id: I1d7f5e459723a103587cfdbedea714270241fd41

7 years agoRemove bad file after merge 42/126442/1
Zofia Abramowska [Fri, 21 Apr 2017 11:12:59 +0000 (13:12 +0200)]
Remove bad file after merge

Change-Id: Id30f75c0435dd1493f1ea33a96c85c6b523c1351

7 years agoMake 'runignored' option work as expected 74/125974/3
Piotr Sawicki [Wed, 19 Apr 2017 12:13:50 +0000 (14:13 +0200)]
Make 'runignored' option work as expected

Change-Id: I73214e9dd8ba06b72b8ce379ce8fd59a8e375d73

7 years agoFix build break caused by gcc/glibc/libstdc++ upgrade. 54/126154/2
Dariusz Michaluk [Thu, 20 Apr 2017 08:32:41 +0000 (10:32 +0200)]
Fix build break caused by gcc/glibc/libstdc++ upgrade.

Change-Id: Ie1fef0cfc63ac4fb5525f7d3731910c77cde9257

7 years agoMerge branch 'security-manager' into tizen 26/125226/2
Zofia Abramowska [Fri, 14 Apr 2017 07:32:36 +0000 (09:32 +0200)]
Merge branch 'security-manager' into tizen

Change-Id: I0f04e63fb07dd00e08c8ea8b595a14d2b04e3491

7 years agoAdd install type field to ScopedInstaller 22/121322/12
Piotr Sawicki [Mon, 27 Mar 2017 13:00:45 +0000 (15:00 +0200)]
Add install type field to ScopedInstaller

ScopedInstaller should use the same install type during installation and
removal of an application.

Change-Id: I50f73c50651dccb31427a6eb98a30a5b09d546f5

7 years agoAdd more security_manager_identify_privilege_provider() tests 21/119921/1
Dariusz Michaluk [Mon, 20 Mar 2017 13:31:17 +0000 (14:31 +0100)]
Add more security_manager_identify_privilege_provider() tests

Change-Id: Id5f0c41f23c41cdd1c6a34f1485628f4faaeb6e2

7 years agoPrevent exceptions in ScopedInstaller destructor 86/109786/4
Krzysztof Jackiewicz [Wed, 11 Jan 2017 13:57:47 +0000 (14:57 +0100)]
Prevent exceptions in ScopedInstaller destructor

Change-Id: Ibc52d27f0c0dd0cdb30233481a70e336b5302a73

7 years agoMerge branch 'tizen' into security-manager 36/119636/1
Krzysztof Jackiewicz [Sat, 18 Mar 2017 07:57:24 +0000 (08:57 +0100)]
Merge branch 'tizen' into security-manager

Change-Id: I12966cd0f6a6d0a38ddd73400918989e470c9e72

7 years agoAdd support for throwing RAII destructors 56/110056/7
Krzysztof Jackiewicz [Thu, 12 Jan 2017 11:16:26 +0000 (12:16 +0100)]
Add support for throwing RAII destructors

When a test finishes or fails the stack is unwinded some of such objects'
destructors still perform actions that may report an error/throw an exception.
If we just surround these actions with try/catch block we'll lose information
about errors in these destructors. If we let destructors throw it may lead to
program termination (unhandled exception during stack unwind caused by another
exception).

To prevent program termination and still get the information about errors in
destructors surround the throwing code in your RAII object destructor with
SafeCleanup::run.

Tests for cleanup exception handling are added and can be executed with:
cleanup_test.sh

Change-Id: Id4e257aadea9b18fe890c89d8f182082a7f191a3

7 years agoCynara: fix cynara-monitor tests 48/112248/3
Dariusz Michaluk [Mon, 30 Jan 2017 13:21:50 +0000 (14:21 +0100)]
Cynara: fix cynara-monitor tests

[timeout.h:71] Assertion failed (status == std::future_status::timeout)
expected future status is <TIMEOUT> [1] received future status is <READY> [0]

Change-Id: I5832e0edce2f1a9cc878af5f3bcf3efd5bc2b4c8

7 years agoAdd security_manager_identify_privilege_provider() tests 94/118894/2
Dariusz Michaluk [Mon, 13 Mar 2017 16:32:12 +0000 (17:32 +0100)]
Add security_manager_identify_privilege_provider() tests

Change-Id: I56533a6e4675b1764597b22100f483e6ba8c9ec8

7 years agoAdjust test security_manager_09_app_install_constraint_check 98/118698/2
Rafal Krypa [Mon, 13 Mar 2017 15:42:35 +0000 (16:42 +0100)]
Adjust test security_manager_09_app_install_constraint_check

Adapt to new change in security-manager that allows platform version
for an app to be changed during app upgrade.

Change-Id: I1f7dfa4602c1561e76ced32870a2c0ea7f20d090
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
7 years agoFix app_defined_05_global_local_install 91/118091/1
Dariusz Michaluk [Fri, 3 Mar 2017 14:21:12 +0000 (15:21 +0100)]
Fix app_defined_05_global_local_install

MANIFESTS bucket split to MANIFESTS_GLOBAL & MANIFESTS_LOCAL

Change-Id: I21badf1f5b6a614ba81cc4484e2eb0ae092cc50f

7 years agoAdjust security_manager_20_user_cynara_policy 90/118090/1
Dariusz Michaluk [Fri, 3 Mar 2017 14:16:49 +0000 (15:16 +0100)]
Adjust security_manager_20_user_cynara_policy

MANIFESTS bucket split to MANIFESTS_GLOBAL & MANIFESTS_LOCAL

Change-Id: Ice44dac4cbb00d9194074e6b32df78abdc3fba31

7 years agoAdd test for global/local app defined privileges 86/116486/1
Dariusz Michaluk [Fri, 24 Feb 2017 10:56:45 +0000 (11:56 +0100)]
Add test for global/local app defined privileges

Change-Id: Ia9aae496fc5a23ec636c5746bbf1c872efe78c1b

7 years agoAdd test for app defined privileges update 20/116320/3
Dariusz Michaluk [Thu, 23 Feb 2017 14:17:01 +0000 (15:17 +0100)]
Add test for app defined privileges update

Change-Id: I4bc9402b33836a1d5394764a4ff8474902f2324c

7 years agoRemove duplicated code 21/116321/1
Bartlomiej Grzelewski [Thu, 23 Feb 2017 16:04:26 +0000 (17:04 +0100)]
Remove duplicated code

Change-Id: Id4512340f874a84181af3703866f7a16a3f06bce

7 years agoAdd test for cynara policy database remove 73/116273/1
Dariusz Michaluk [Thu, 23 Feb 2017 12:28:54 +0000 (13:28 +0100)]
Add test for cynara policy database remove

Change-Id: I47688bf973b7288d1901d9c820942dd4c2ff1b91

7 years agoAdd test for cynara policy database update 62/115862/1
Bartlomiej Grzelewski [Tue, 21 Feb 2017 15:33:59 +0000 (16:33 +0100)]
Add test for cynara policy database update

Change-Id: Ibc424e56cf2be97a927334a2d7d5c2214534103d

7 years agoRework Application Defined Privileges support and tests 92/115592/3
Dariusz Michaluk [Mon, 20 Feb 2017 11:19:41 +0000 (12:19 +0100)]
Rework Application Defined Privileges support and tests

Change-Id: I629bab91e4f04076bad9ec300943c6e83ba9ba6c

7 years agoAdd tests for application defined privileges 41/113741/5
Bartlomiej Grzelewski [Fri, 3 Feb 2017 15:49:29 +0000 (16:49 +0100)]
Add tests for application defined privileges

Change-Id: Idbceecaabab13449089006b086e95655d822257b

7 years agoAdd support for Application Defined Privileges 40/113740/4
Bartlomiej Grzelewski [Fri, 3 Feb 2017 15:48:45 +0000 (16:48 +0100)]
Add support for Application Defined Privileges

Change-Id: I51122a50ac1b6f0c169659c07fcc9da02bd3ef36