dtpyvb1873 2011-06-14 12:39
浏览 49
已采纳

跨不同子域进行身份验证(但不是全部)

I have a site set up on www.domain.com, the site can authenticate users and persist their credentials in a cookie.

On occasions the users access handlers that are set up on different servers on a different sub domain. handlers.domain.com

I can't afford to use wildcard subdomain cookies (Cookies should not be available for other subdomains)

My solution for access control up until now was that every URL used for handlers.domain.com had a guid specific to the user. The handlers on the other site would assume the identity of the guid owner. This of course is not such a good security practice.

i was thinking about an alternative solution: All links to handlers.domain.com will actually be links to a redirector script on www.domain.com that will redirect to an encrypted time stamped url on handlers.domain.com which will then know for sure that it was accessed as a direct authenticated redirection from www.domain.com. This solution will work fine on GET scenarios but will fail with handlers expecting POST data (up do big uploaded files)

Does anyone know or can think of a better solution or have any insight on my solution?

(In this case I am using ASP.NET but the solution will probably be platform agnostic, so I will tag this with various web platforms)

Thanks!

  • 写回答

2条回答 默认 最新

  • dpbv85276 2011-06-14 12:56
    关注

    As you do not want to use cookies to establish a session (group of requests) you need to find other ways. As the information of the cookie is passed readable within the HTTP request, I do not see a problem if you for that one particular request pass that information as part of a POST request.

    If you prefer a GET request I would additionally add a flag inside the users server-side session prior the redirect so to give the script that is the destination of the redirect the possibility to verify the validity of the request on the server-side.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值