Languages

Menu
Sites
Language
Preference API 를 통해 저장된 데이터는 보안이 유지되나요?

Preference API 를 통해 저장된 데이터는 보안이 유지되는지

알고 싶습니다.

 

ex)

타앱에서 접근이 가능하는지

sdk를 통한 단말내부의 파일시스템에 접근해서 열람이 가능한지

 

Responses

4 Replies
Armaan-Ul- Islam

As far as I know stored preferences is your application data.

 

1) Other applications installed on the device cannot access your application data unless you share them using Application Data Exchange (message port/data control).

 

2) It is possible to pull the file system using sdb (terminal) commands, but I don't thing anyone can understand/manipulate such data. (Just like: your high score in a mobile game is 25, you know it is stored somewhere on your device but you can't just acces that data or change that data ).

 

So, seems secure. But Prefence won't be the best way to store vulnerable/secret data I guess. Anyways, you may also add encryption to your code.

 

Encryption: Sets the encryption of application resources (JS, CSS, and HTML files).  Add this line of code in config.xml:

 

<tizen:setting background-support="disable" encryption="enable" hwkey-event="enable"/>

 

https://developer.tizen.org/ko/development/training/web-application/application-development-process/setting-project-properties?langredirect=1#set_widget

JaeYeong Eom

Thank you, Youre answer was vary helpful to me

Onur Şahin

Application prefrences are kept as clear text under /opt/user/apps/{your_package_name}/data/.pref/{some_hash_of_preference_key} and can be readable if user has root rights.

sh-3.2# cd /opt/usr/apps/{your_package_name}/
sh-3.2# ls -la
total 268
drwxr-xr-x  9 root root   4096 Mar 10 23:13 .
drwxr-xr-x 13 root root   4096 Mar 10 23:13 ..
-rw-r--r--  1 root root 110755 Mar 10 23:13 author-signature.xml
drwxr-xr-x  2 root root   4096 Mar 10 23:13 bin
drwxr-xr-x  2 app  app    4096 Mar 10 23:13 cache
-rw-r--r--  1 root root   1229 Mar 10 23:13 config.xml
drwxr-xr-x  4 app  app    4096 Mar 10 23:14 data
drwxr-xr-x  2 root root   4096 Mar 10 23:13 lib
drwxr-xr-x  3 root root   4096 Mar 10 23:13 res
drwxr-xr-x  6 root root   4096 Mar 10 23:13 shared
-rw-r--r--  1 root root 111143 Mar 10 23:13 signature1.xml
-rw-r--r--  1 root root    989 Mar 10 23:13 tizen-manifest.xml
drwxr-xr-x  2 app  app    4096 Mar 10 23:13 tmp
sh-3.2# cd data
sh-3.2# ls -la
total 56
drwxr-xr-x 4 app  app   4096 Mar 10 23:14 .
drwxr-xr-x 9 root root  4096 Mar 10 23:13 ..
drwxr-xr-x 2 app  app   4096 Mar 10 23:14 .pref
-rw-r--r-- 1 app  app  16384 Mar 10 23:13 .security_origin.db
-rw-r--r-- 1 app  app    512 Mar 10 23:13 .security_origin.db-journal
drwx------ 4 app  app   4096 Mar 10 23:14 .webkit
-rw-r--r-- 1 app  app  16384 Mar 10 23:13 .widget_interface.db
-rw-r--r-- 1 app  app    512 Mar 10 23:13 .widget_interface.db-journal 
sh-3.2# cd .pref
sh-3.2# ls -la
total 84
drwxr-xr-x 2 app app 4096 Mar 10 23:14 .
drwxr-xr-x 4 app app 4096 Mar 10 23:14 ..
-rw-rw---- 1 app app   26 Mar 10 23:14 15b404cc3df4d499145f7ee629d3afcd056a8bb5
-rw-rw---- 1 app app   20 Mar 10 23:14 1705c583a02aeb133b4ac0b8ef60b0afc579cd9a
-rw-rw---- 1 app app   27 Mar 10 23:14 1f5f0a62996fce8f7da5b49f0baf1c4c16079a0d
-rw-rw---- 1 app app   43 Mar 10 23:14 3c2b6cb059882b5f980788cd4c2e41df4fb2e0a9
-rw-rw---- 1 app app   33 Mar 10 23:14 4d9ed135041a584ae5b86e6d6fe778f43b2550e4
-rw-rw---- 1 app app   25 Mar 10 23:14 5506f244556be09b2d6098411e6f17c400db0f25
-rw-rw---- 1 app app   27 Mar 10 23:14 664afaa73b95db10e7e06b7418b655168b3eea02
-rw-rw---- 1 app app   27 Mar 10 23:14 7562c932c64ce00dd3f447c58815d22fe49316eb
-rw-rw---- 1 app app   24 Mar 10 23:14 8c7ad9eff57fd00ca7fd764f37aed55e881ee2d8
-rw-rw---- 1 app app   33 Mar 10 23:14 8cb775b1d6779d3582d803123306be2ec05943dd
-rw-rw---- 1 app app   23 Mar 10 23:14 94f5a486323e33c731af08f3e12bdbec9254c3a9
-rw-rw---- 1 app app   28 Mar 10 23:14 a1b0ccb420ce5d35a7fc93b13fdfba0bb8151415
-rw-rw---- 1 app app   23 Mar 10 23:14 bbf5d4a307a376f790c3c916216b679737ce550d
-rw-rw---- 1 app app   45 Mar 10 23:14 c5e7144fab80191e90912aa2c841f38f6402ee7b
-rw-rw---- 1 app app   32 Mar 10 23:14 cc90bbedce2ae0d10cafde8402711a8144da0c94
-rw-rw---- 1 app app   25 Mar 10 23:14 d3b6115a55b407a09ebadfc97c446bcd71949dba
-rw-rw---- 1 app app   24 Mar 10 23:14 de4e12e1f5d97cc353637d341844ade86f86ea62
-rw-rw---- 1 app app   26 Mar 10 23:14 ecfd18ac36b9d042f6abf7ab45aeb9c91d74684d
-rw-rw---- 1 app app   38 Mar 10 23:14 f7d7ce38587cbe58eae2bcbcd61cdcb4c91be654
sh-3.2# cat 15b404cc3df4d499145f7ee629d3afcd056a8bb5
           soundPath   Retro.wav 
sh-3.2# cat 1705c583a02aeb133b4ac0b8ef60b0afc579cd9a
   soundVolume   8 
sh-3.2#

 

JaeYeong Eom

Thank you for your detailed answer!!