您可以删除 iOS 移动设备上安装程序用户代理(与 Safari 不同)使用的 cookie 吗?

发布于 2025-01-06 02:58:51 字数 782 浏览 2 评论 0原文

我们正在企业内部向员工无线部署 iOS 应用程序,并且我们正在通过 SiteMinder 控制谁可以访问下载站点,SiteMinder 对用户进行身份验证并根据 AD 组成员身份对其进行授权。此身份验证过程会在设备上创建一个 cookie,指示用户已通过身份验证(并且可能也已获得授权),因此他们不会继续针对每个请求一遍又一遍地收到提示。

问题在于,用户可以下载并安装该应用程序一次,之后就无法再次安装该应用程序,因为他们陷入了凭据提示循环。此循环是由于 Siteminder 身份验证 cookie 已过期且设备上的用户代理未删除或更新而导致的。

据我所知,这是因为以“itms-Services://”开头的 OTA 安装 URL 使用与设备上的 mobile-Safari 不同的用户代理,并且不响应来自的 cookie 删除调用该网站不会自行删除 cookie。这也意味着在 Safari 下删除 cookie、清除缓存和网站数据并不能解决问题 - Safari 不拥有 cookie。

删除应用程序(如果仍然安装)也不能解决问题,重新启动设备也不能解决问题(我还没有尝试擦除设备,也不能真正开始要求我们的用户这样做)。

那么,有没有办法告诉用户代理 itms-services 正在使用它来删除设备上的 cookie,或者对于 iOS 应用程序的 OTA 部署,是否有其他解决此问题的方法?

在这种情况下,使用 Apple AppStore 并不是一个可行的解决方案。
更改 SiteMinder 中的参数而不是管理 cookie 的命名以创建新的 cookie 也是不可行的,因为这会对该 SiteMinder 域支持的其他单点登录用户产生不利影响。

We are deploying iOS apps over the air (OTA) within our enterprise to employees and we are controlling who can access the download site via SiteMinder which authenticates the user and authorizes them based on AD group membership. This authentication process creates a cookie on the device indicating the user is authenticated (and probably that they are authorized too) so they don't continue to get prompted over and over again for each request.

The problem is that the user can download and install the app once and thereafter can never install the app again because they get caught in a credentials prompt loop. This loop is caused by the fact that the Siteminder authentication cookie has expired and is not being deleted or renewed by the user-agent on the device.

From what I've read, this is because the OTA installation URL, which starts with "itms-Services://" uses a different user-agent than mobile-Safari on the device and doesn't respond to the cookie delete call from the site and doesn't delete the cookie on its own. This also means that deleting cookies, purging cache and website data under Safari doesn't resolve the issue - Safari doesn't own the cookie.

Deleting the app (if its still installed) doesn't solve the problem either, nor does rebooting the device (I have not tried wiping the device yet and can't really start asking our users to do that anyway).

So, is there a way to tell the user-agent that itms-services is using to delete its cookies on the device or is there some other work-around to this issue for OTA deployment for iOS applications?

Using the Apple AppStore is not a viable solution in this case.
Changing the parameters in SiteMinder than govern the naming of the cookies so a new cookie is created is also not viable since this would adversely impact other single-sign-on users that this SiteMinder domain supports.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

睡美人的小仙女 2025-01-13 02:58:51

我们最近遇到了类似的问题。我们可以通过将“Allow HEAD”添加到 siteminder 中的受保护资源来修复此问题。 Siteminder 管理员可能仅启用“GET 和 POST”作为允许的操作。

We faced similar issue recently. We were able to fix it by adding "Allow HEAD" to the protected resource in siteminder. Siteminder admins may have only enabled "GET and POST" as allowed operations.

西瑶 2025-01-13 02:58:51

您可以通过以下方式删除cookie:

 for(NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) {

    if([[cookie domain] rangeOfString:@"mydomain.com"].location!=NSNotFound) {

        [[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie];
    }
}

You can delete cookies the following the way:

 for(NSHTTPCookie *cookie in [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookies]) {

    if([[cookie domain] rangeOfString:@"mydomain.com"].location!=NSNotFound) {

        [[NSHTTPCookieStorage sharedHTTPCookieStorage] deleteCookie:cookie];
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文