Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【已评审】管理员可设置是否允许同一用户能在多点同时连接登录 #460

Open
abbyWJM opened this issue May 20, 2022 · 5 comments
Assignees
Labels
canway 需求来源为嘉为侧 Layer: api Api module related Layer: login Login module related Sign: feature requested New feature request Type: enhancement Enhancement for existing feature Type: proposal Proposal

Comments

@abbyWJM
Copy link

abbyWJM commented May 20, 2022

No description provided.

@abbyWJM abbyWJM added Sign: feature requested New feature request Type: proposal Proposal labels May 31, 2022
@Zoeyzhou11
Copy link

Zoeyzhou11 commented Aug 17, 2022

需求背景
部分用户会相关安全需求,需要禁止同一账号在多地同时登陆

需求描述
1、在【设置】中,新增【登陆设置】页面
管理员默认关闭【禁止多会话登陆】。选择禁用多会话时,则任何时刻系统仅允许用户账号单一登录

2、当用户开启【禁止多会话登陆】时,弹出配置项,需要用户选择:延迟生效,保存配置后不会停止当前存在多会话访问的账号会话,当同一账号有新会话建立时,才会停止已建立的会话/立即生效,保存配置后将会立即停止存在多会话访问的账号中非最晚登入的账号会话
image

  1. 延迟生效:存量连接不处理,直到会话达到最大超时时间,或者同一账号有新的登录会话时,才提示用户将退出已有登录连接。
  2. 立即生效:所有存量连接将会被立即强制下线。

新登录会话处理:
image

@Shutulee
Copy link
Collaborator

Shutulee commented Nov 11, 2022

评审后方案刷新

方案说明

image

产品原型

多会话登录

image

多会话存量提醒

image

登录拦截提醒

image

@wklken
Copy link
Collaborator

wklken commented Nov 11, 2022

多会话存量提醒 => 这个目前的情况, 拿bk_token去校验登录态, 只有两种结果: 1.合法 2.不合法

目前所有系统和 saas, 都是在中间件实现, 所有请求都会去校验

一旦不合法, 直接跳转登录; 一旦合法, 处理正常请求返回接口数据;

所以此时是无法侵入这个流程的, 实现这种提醒(并且目前没有通知推送服务, 无法主动推送)

@Shutulee Shutulee added this to the Y2022M45 milestone Nov 14, 2022
@Xmandon Xmandon changed the title 管理员可设置是否允许同一用户能在多点同时连接登录 【已评审】管理员可设置是否允许同一用户能在多点同时连接登录 Nov 14, 2022
@Xmandon Xmandon assigned nannan00 and unassigned nannan00 Nov 14, 2022
@Xmandon Xmandon removed this from the Y2022M45 milestone Nov 14, 2022
@wklken wklken added Type: enhancement Enhancement for existing feature Layer: api Api module related Layer: login Login module related labels Nov 14, 2022
@wklken
Copy link
Collaborator

wklken commented Nov 21, 2022

其他风险: 重要, 可能带来生产事故

某些情况下, 大量使用模拟登录或者可能从后台直接签发了永久的bk_token用户定时任务, 此时如果配置只允许一个连接

那么, 原先生效的逻辑可能都会遇到问题

以模拟登录为例, 原先并发调用登录接口, 同一个用户签发多个bk_token, 之后拿去调用 API;
只允许一个合法登录开启后, 此时并发将只有一个调 API 会成功, 其他的都会失效

@pagezz-canway
Copy link

设计完善:被踢出的用户,再次登录时提示被踢出,需要xxx分钟(该时长可以后台配置)后才能重新登录

@Canway-shiisa Canway-shiisa added the canway 需求来源为嘉为侧 label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
canway 需求来源为嘉为侧 Layer: api Api module related Layer: login Login module related Sign: feature requested New feature request Type: enhancement Enhancement for existing feature Type: proposal Proposal
Projects
None yet
Development

No branches or pull requests

8 participants