使用 shareduserid 的安全性
security in using shareduserid
这听起来像是一个模糊的问题,但我不得不问。
我是初学者 android 开发人员,刚开始了解 android 中进程间通信的工作原理。
如果在 2 个应用程序中使用相同的 shareduserid,那么他们有权访问彼此的数据,这意味着我可以反编译任何 apk,从清单中找出它的 shareduserid,并使用相同的 shareduserid 创建我的应用程序来访问它的数据。
我是不是漏掉了什么?
如果我以后想创建 2 个应用程序(它们一起工作从而暴露 shareduserid),我应该如何保证我的数据安全?
共享用户 ID 由证书签名强制执行。仅当应用程序使用相同的证书签名时,平台才会 grant/assign 相同的用户 ID。 Ref.:
android:sharedUserId
The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.
这听起来像是一个模糊的问题,但我不得不问。
我是初学者 android 开发人员,刚开始了解 android 中进程间通信的工作原理。 如果在 2 个应用程序中使用相同的 shareduserid,那么他们有权访问彼此的数据,这意味着我可以反编译任何 apk,从清单中找出它的 shareduserid,并使用相同的 shareduserid 创建我的应用程序来访问它的数据。
我是不是漏掉了什么?
如果我以后想创建 2 个应用程序(它们一起工作从而暴露 shareduserid),我应该如何保证我的数据安全?
共享用户 ID 由证书签名强制执行。仅当应用程序使用相同的证书签名时,平台才会 grant/assign 相同的用户 ID。 Ref.:
android:sharedUserId
The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.