简体   繁体   English

Fabric.io Twitter凭据安全性

[英]Fabric.io Twitter Cridentials security

I wasn't sure if I was supposed to ask this here, or in the security stackoverflow page, but I'm sure somebody has a great answer on this. 我不确定是否应该在这里或在安全​​堆栈溢出页面中询问此问题,但是我确定有人对此有很好的回答。

I'm building an Android app which uses the Fabric.io Twitter package . 我正在构建一个使用Fabric.io Twitter packageAndroid应用。 Using this requires a TWITTER_KEY and a TWITTER_SECRET code. 使用此功能需要TWITTER_KEYTWITTER_SECRET代码。 I'm trying to hide them, because that's what they mention when the package is added. 我正试图隐藏它们,因为添加包时它们就是它们提到的内容。

At the moment I'm saving my cridentials in a SharedPreference like this at the beginning of my splash screen activity: 目前,在初始屏幕活动开始时,我将凭证保存在这样的SharedPreference

PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).edit().putString("TWITTER_KEY", "xxxxxxxxxxxxxxxxxxxxxxx").commit();

Later, for initializing the Twitter package, I'm recieving them like this: 稍后,为了初始化Twitter程序包,我收到了这样的消息:

TwitterAuthConfig authConfig = new TwitterAuthConfig(PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString("TWITTER_KEY", "defaultStringIfNothingFound")

I do the same with the TWITTER_SECRET code. 我对TWITTER_SECRET代码也是如此。


I have two questions: 我有两个问题:

  1. What can people achieve if they have access to my keys? 如果人们可以访问我的密钥,可以实现什么?
  2. Is this safe enough so that other apps can't acces my keys? 这样是否足够安全,以使其他应用程序无法访问我的密钥?
  3. Is this safe enough for app decompiling? 这对于应用程序反编译是否足够安全?

Thanks for your help! 谢谢你的帮助!

What can people achieve if they have access to my keys? 如果人们可以访问我的密钥,可以实现什么?

I don't know the API so I cannot answer this. 我不知道API,所以无法回答。

Is this safe enough so that other apps can't acces my keys? 这样是否足够安全,以使其他应用程序无法访问我的密钥?

Yes, unless the other app has root permission. 是的,除非另一个应用程序具有root权限。

Is this safe enough for app decompiling? 这对于应用程序反编译是否足够安全?

No. But there is little you can do about it. 不。但是您对此无能为力。 You can make it somewhat harder to find the key but there is no 100% solution if the key is somehow embedded in the app. 您可能会更难找到密钥,但是如果密钥以某种方式嵌入到应用程序中,则没有100%解决方案。 Whatever the app can do to recover the key can also be done by an attacker. 应用程序可以执行任何恢复密钥的操作,也可以由攻击者完成。

Btw. 顺便说一句。 why do you store the key in shared preferences? 为什么将密钥存储在共享首选项中?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM