accont opened a new issue, #3933: URL: https://github.com/apache/incubator-streampark/issues/3933
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-streampark/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues. ### Java Version 1.8 ### Scala Version 2.11.x ### StreamPark Version 2.1.4 ### Flink Version 1.18.1 ### deploy mode yarn-application ### What happened 调用接口:/flink/app/start 1. 在令牌管理页面使用admin用户生成令牌后,在 t_access_token 表中拿到令牌然后调用接口 2. 调用接口是定时任务,在上午能成功启动任务运行完成,过了3小时后,没做任何修改,再次运行时接口返回401 3. 验证token 是一致的 进入作业详情 复制作业的启动curl : curl -X POST '/flink/app/start' \ -H 'Authorization: 69qMW7reOXhrAh29LjPWwwP+quFqLf++MbPbsB9/NcTCKGzZE2EU7tBUBU5gqG236VF5pMyVrsE5K7hBWiyuLqICNwPEEj7zzjFzA1ji5V6Hj3O3o2/ZwIYuIdSdSedz01hOX8wwQTJvbbp8kbAEenDllTnlkTxKB910HXaUKUxRhqUDubDlxsn3KBDrYO43WaUoxZBOlEwmc1Mgc5EWpXRclTPOFwQnPKrFL4YXgWU=' \ -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \ --data-urlencode 'teamId=100000' \ --data-urlencode 'allowNonRestored=false' \ --data-urlencode 'id=100005' \ --data-urlencode 'savePointed=false' \ -i 进行数据库查询 t_access_token 表中的token,对比发现后是一致的,确定调用 的接口也是该表中的token字段没有任何调整,在次手动触发一次,依旧返回401,使用curl执行也是返回401 5.页面F12排查 通过页面F12发现,接口调用的已经是另一个token了 页面的token:69qMW7reOXhrAh29LjPWwwP+quFqLf++MbPbsB9/NcTCKGzZE2EU7tBUBU5gqG236VF5pMyVrsE5K7hBWiyuLuuoqIY1ywErlAdu3x+j4qxsjTP05Zy79vbouIGBZun34J55n8fuKwdwFJadsMG82x0Ldejm5Gp0qgImkwLo2CxSTkMBcBSADuDMNaYIerR1HqMeAFhy3TgMq16Z8rAz7pgXO33ZZNcQNADllg07uIY= 然后将页面的新token替换接口参数去执行,能正常执行,作业运行完成 页面的token是不固定的,所以也不能直接使用,只能测试验证对比 ### Error Exception ```log 调用接口提示的日志: 2024-08-01 15:38:44 | INFO | XNIO-1 task-5 | org.apache.streampark.console.base.handler.GlobalExceptionHandler:54] Unauthenticated: This subject is anonymous - it does not have any identifying principals and authorization operations require an identity to check against. A Subject instance will acquire these identifying principals automatically after a successful login is performed be executing org.apache.shiro.subject.Subject.login(AuthenticationToken) or when 'Remember Me' functionality is enabled by the SecurityManager. This exception can also occur when a previously logged-in Subject has logged out which makes it anonymous again. Because an identity is currently not known due to any of these conditions, authorization is denied. ``` ### Screenshots _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR!(您是否要贡献这个PR?) ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
