简体   繁体   English

在开发人员帐户迁移期间保留钥匙串数据

[英]Preserving Keychain data during developer account migration

I am migrating our organisation's app to a new developer account, for internal reasons. 由于内部原因,我正在将我们组织的应用程序迁移到新的开发者帐户。 I've learned that upon transferring the app to the new account, and after we release an update for the app from the new developer account, we will incur a one time loss of keychain data. 我了解到,将应用程序转移到新帐户后,以及从新的开发人员帐户发布应用程序更新之后,我们将损失一次钥匙串数据。 My concern is, that we cannot afford this loss of data. 我担心的是,我们无法承受这种数据丢失的风险。 Due to security reasons and nature of the type of clients using the app. 由于安全原因和使用该应用程序的客户端类型的性质。

So my question is 2 part; 所以我的问题是两部分;

1) Is there any way that I can prevent this keychain data loss? 1)有什么方法可以防止此钥匙串数据丢失?

2) If not, what are the alternate strategies I can use to prevent the users from getting logged out during this transition? 2)如果没有,我可以用来防止用户在此过渡期间注销的替代策略是什么?

Assuming you're talking about a real, full App Transfer I don't think this is possible. 假设您是在谈论真实,完整的App Transfer,那么我认为这是不可能的。 Keychains are not just differentiated via the app ID, but also the organization's ID (or more precisely the organization's ID is part of an app ID). 钥匙串不仅通过应用程序ID进行区分,还通过组织的ID进行区分(或更确切地说,组织的ID是应用程序ID的一部分)。 Since the app's ID de facto changes with a transfer, iOS will prevent it to look up its old keychain. 由于该应用程序的ID实际上随着转移而变化,因此iOS将阻止其查找其旧钥匙串。 Not even app groups get around this, as a group cannot consist of apps by different organizations AFAIK. 甚至应用程序组也无法解决这个问题,因为一个组不能包含不同组织AFAIK的应用程序。 Apple would need to implement a kind of exception to this for at least a certain "migration period", but I doubt that will ever happen (for security considerations). 苹果至少需要在一定的“迁移期”内对此实施某种例外,但是我怀疑这种情况是否会发生(出于安全考虑)。

The only way to circumvent a re-login so that the transferred app can save the credentials in its "new" keychain would be to first have an update for the old , not-yet transferred app and have it save the credentials elsewhere, then have the transferred app look them up from there. 避免重新登录以便转移的应用程序可以将凭据保存在其“新”钥匙串中的唯一方法是首先对的尚未转移的应用程序进行更新,然后将其保存在其他位置,然后再进行转移的应用程序从那里查找它们。 I'd strongly recommend against this for security reasons, but if you absolutely must do that, you could upload the credentials somewhere secure (via an encrypted connection, obviously, ie SSL). 出于安全原因,我强烈建议您这样做,但是如果您绝对必须这样做,则可以将凭据上传到安全的位置(显然是通过加密连接,即SSL)。 You might even be able to use shared web credentials for this, but I haven't looked into that too deeply, so I am not sure whether both apps can be configured to be associated with that website (they're coming from two different teams, after all, but it might be allowed). 您甚至可以为此使用共享的Web凭据 ,但是我并没有对此进行深入研究,因此我不确定是否可以将这两个应用程序都配置为与该网站相关联(它们来自两个不同的团队) ,但可以允许)。

Even then, some users might "miss" the update of the older app before the transfer (and update to the "new" one), then they would have to re-login anyways. 即使那样,某些用户在传输之前可能会“错过”较旧应用程序的更新(而更新为“新”应用程序),那么无论如何他们将不得不重新登录。

If you follow this idea, be aware that you're "moving around" users' private data in a new way! 如果您遵循这个想法,请注意,您正在以一种新方式“四处走动”用户的私人数据! Considering the recent GDPR fuzz this might even have string legal implications, so check with your company's legal advisors about this, too! 考虑到最近的GDPR混乱,这甚至可能会带来一系列法律上的隐患,因此也请与您公司的法律顾问联系!

1) There is no way your can prevent data loss, since the App ID Prefix has changed during app transfer TN2311 > A one-time loss in keychain data will occur if you switch your App ID prefix 1)您无法防止数据丢失,因为在应用程序传输期间App ID前缀已更改TN2311>如果切换您的App ID前缀,则钥匙串数据将一次性丢失

2) If you application utilizes Push Notification, you can use the APNs device tokens to remap the user account. 2)如果您的应用程序使用推送通知,则可以使用APNs设备令牌来重新映射用户帐户。

Once the new app is launched: 新应用启动后:

  1. Send the device token to server 将设备令牌发送到服务器
  2. Find the username from your database 从您的数据库中找到用户名
  3. Generate a session token (add your own security design here) 生成会话令牌(在此处添加您自己的安全设计)
  4. Save username + the token in your new Keychain 将用户名+令牌保存在新的钥匙串中

For those who doesn't allow notification, just force them to relogin 对于那些不允许通知的人,只需强迫他们重新登录

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

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