polaris icon indicating copy to clipboard operation
polaris copied to clipboard

北极星控制台的鉴权逻辑需要从ClientToken转为Json Web Token

Open chuntaojun opened this issue 1 year ago • 1 comments

What is the feature you want to add?

  • 控制台接口的 token 检查逻辑新增基于 JWT 的检查逻辑
    • 用户登陆时,返回一个 Json Web Token,不返回用户的 token
    • server 端接收到 JWT 时进行相关检查
      • JWT 是否过期,JWT 对应的 user-id 是否正确,sign 是否正确
    • 然后根据 user-id 查询对应 user 的 token
    • 继续原本的 CheckConsolePermission 逻辑
  • server 新增根据旧的 JWT 申请新的 JWT 接口
  • server 的鉴权检查,需要兼容新老 console 的 token
  • polaris-console 新增针对 JWT 的存储以及定期申请新 token 的操作

Why do you want to add this feature?

How to implement this feature?

Additional context Add any other context or screenshots about the feature request here.

chuntaojun avatar Jul 09 '22 02:07 chuntaojun

pls assign me

GuiyangZhao avatar Aug 05 '22 14:08 GuiyangZhao

may be fixed at polaris-console: https://github.com/polarismesh/polaris-console/pull/91

GuiyangZhao avatar Aug 16 '22 02:08 GuiyangZhao