Android 中是否可以进行无 OTP 身份验证?
问题陈述:用户 X 想要登录或注册应用程序 A 和应用程序 B。
考虑:-
- 操作系统环境:Android
- 用户 X、设备 D、应用程序 A 和应用程序 B(应用程序 A 和应用程序 B 是两个不同的组织)
- 应用程序 A 和应用程序 B 位于同一设备 D 上
- 应用程序 A 和应用程序 B 使用身份验证 SDK“SDK1”。
方法 1: 用户 X 使用 OTP 通过手机号码验证在应用程序 A 上对自己进行身份验证。 用户 X 使用 OTP 通过手机号码验证在应用程序 B 上对自己进行身份验证。
方法 2: 用户 X 使用 OTP 通过手机号码验证在应用程序 A 上对自己进行身份验证。 用户 X 使用应用程序 A 上的身份验证信息在应用程序 B 上对自己进行身份验证。
我有兴趣探索方法 2,并想知道它的可行性和安全影响。
让我们深入研究方法 2 -
- 用户 X 通过使用 OTP 的手机号码验证在应用程序 A(使用 SDK1)上进行自身身份验证。
- SDK1将SIM-ID的信息和唯一的Id存储在设备上的文件F中(在所有应用程序都可以访问的共享空间中),并将该信息发送到服务器。 注意:此文件“F”使用对称算法(例如AES)加密;密钥仅远程存储在服务器上。
- 用户X尝试登录应用程序B(使用SDK1),SDK将加密文件F发送到服务器,服务器使用步骤2中生成的密钥解密该文件并验证SIM ID和设备ID(保留SIM ID)如果我想确保 SIM 卡仅存在于设备中)。如果文件数据与服务器上存储的数据匹配,则服务器认为无需再次对应用程序 B 进行用户身份验证,因为在对应用程序 A 进行身份验证期间已经完成了该操作。
我在这种方法中看到的问题:-
- 如果文件 F 被盗后,其他人就可以冒充用户 X,这可能会导致身份盗用(即使文件已加密,也可能发生)和安全漏洞。
- 所有应用程序都可以访问该文件,因此任何人都可以删除它。
- 设备 ID 的最佳选项应该是什么?广告 ID、会话 ID 还是其他?
PS:我不想提示用户额外的权限。
问题- 我上面列出的问题有哪些解决方案?在 Android 环境中实现这种方法是否存在其他安全/可行性问题?
Problem Statement: User X wants to Log In or Signup to App A and App B.
Considering:-
- OS Environment: Android
- User X, Device D, App A and App B(App A and App B are two different organizations)
- App A and App B are on the same Device D
- App A and App B use the authentication SDK “SDK1”.
Approach 1:
User X authenticates itself on App A via Mobile Number verification using OTP.
User X authenticates itself on App B via Mobile Number verification using OTP.
Approach 2:
User X authenticates itself on App A via Mobile Number verification using OTP.
User X authenticates itself on App B by using the information from authentication on App A.
I am interested in exploring Approach 2 and want to know it’s feasibility and security implications.
Let's Deep dive into Approach 2 -
- User X authenticates itself on App A (that uses SDK1) by Mobile Number verification using OTP.
- SDK1 stores the information of SIM-ID and a unique Id in a file F on the device (in a shared space to which all Applications have access to), And sends this information to the server.
Note: This file “F” is encrypted using a Symmetric Algorithm(e.g. AES); the key is remotely stored only at the server. - User X tries to login into App B(that uses SDK1), the SDK sends the encrypted file F to the server where the server decrypts the file using the key generated at step 2 and validates the SIM ID and Device ID(SIM ID is kept in case I want to ensure that SIM is present in the device only). If the file data matches the data stored on the server then Server assumes that there is no need to do user authentication for App B again, as it has been already done during authentication for App A.
Problem I see in this approach:-
- If the File F is stolen then somebody else can impersonate user X and that can lead to identity theft(it can happen even if the file is encrypted) and security breach.
- All the applications will have access to this file so anybody can delete it.
- What should be the best option for device ID? Ad ID, Session ID, or something else?
PS: I don’t want to prompt the user for extra permissions.
Question- What are the solutions to the problem I listed above? Is there any other Security/Feasibility problem in implementing such an approach in the Android environment?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论