第 3 方公司已要求我们使用以下方法与他们实施单点登录。我熟悉 OAuth 授权和 OIDC 流程,但这对我来说似乎很奇怪。
此流程开始时,用户已经登录到我的应用程序。
a) Logged in user clicks a link to access the 3rd party system
b) My application creates a random code against the authenticated user with a time to live of 2 minutes and redirects the user to the 3rd party application with the code.
c) Redirect navigates the browser to the 3rd party application with the code.
d) 3rd party sends the code to my application. My application checks the code was one that was issued earlier and within the allocation time.
e) My application returns user information and the 3rd party treats this as Single Sign-On.
让我不舒服的东西...
- 似乎是授权代码授予的糟糕的芒 OAuth 实现
- 没有状态参数,因此存在 XSRF 的风险
- “第三者”可以是任何人
- 活在代码上的时间有点令人担忧
- 无法在 3rd 方应用程序中使用户的会话过期。在 OAuth 中,令牌通常会在一段时间后过期。
这个实现有什么明显不好的地方吗?你认为我在这里可能反应过度而且这实际上是合适的吗?