apache / apache/paimon-webui

[Bug] Requests to all /ui paths in Paimon WebUI return a 401 error

Open
#537 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
147
Forks
63
PR merge metrics
No merged PRs in 30d

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/paimon-webui/issues) and found nothing similar.

### Paimon UI version

0.1.0-rc1
https://dist.apache.org/repos/dist/dev/paimon/paimon-webui-0.1.0-rc1/apache-paimon-webui-0.1.0-bin.tgz

### Compute Engine

Flink

### Minimal reproduce step

Following https://github.com/apache/paimon-webui/blob/main/docs/src/guide/quick-start.md

```
ACTION_JAR_PATH=${ACTION_JAR_PATH} FLINK_HOME=${FLINK_HOME} MYSQL_ADDR=${MYSQL_ADDR} MYSQL_DATABASE=${MYSQL_DATABASE} apache-paimon-webui-0.1.0/bin/start.sh
```

### What doesn't meet your expectations?

I can't get to the login page as navigating to `/ui/login` and `/ui` returns `{"code":401,"msg":"User Not Login","data":null}`.

Logs contain a `cn.dev33.satoken.exception.NotLoginException: 未能读取到有效 token` exception
```
2024-09-19 16:59:44.875 ERROR 22 --- [nio-8888-exec-5] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet]: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is cn.dev33.satoken.exception.NotLoginException: 未能读取到有效 token] with root cause
cn.dev33.satoken.exception.NotLoginException: 未能读取到有效 token
at cn.dev33.satoken.exception.NotLoginException.newInstance(NotLoginException.java:134) ~[sa-token-core-1.35.0.RC.jar:?]
at cn.dev33.satoken.stp.StpLogic.getLoginId(StpLogic.java:941) ~[sa-token-core-1.35.0.RC.jar:?]
at cn.dev33.satoken.stp.StpLogic.checkLogin(StpLogic.java:923) ~[sa-token-core-1.35.0.RC.jar:?]
at cn.dev33.satoken.stp.StpUtil.checkLogin(StpUtil.java:331) ~[sa-token-core-1.35.0.RC.jar:?]
at org.apache.paimon.web.server.configrue.SaTokenConfigurer.lambda$addInterceptors$0(SaTokenConfigurer.java:37) ~[paimon-web-server-0.1.0.jar:0.1.0]
at cn.dev33.satoken.interceptor.SaInterceptor.preHandle(SaInterceptor.java:113) ~[sa-token-spring-boot-starter-1.35.0.RC.jar:?]
```

I haven't changed the [default sa-token configuration](https://github.com/apache/paimon-webui/blob/ef0db0b0189c2aa4f47056543fdb063120868ec2/paimon-web-server/src/main/resources/application.yml#L55):
```
sa-token:
token-name: ${spring.application.name}
timeout: 2592000
active-timeout: -1
is-concurrent: true
is-share: true
token-style: uuid
is-log: false
is-print: false
is-read-cookie: true
is-write-header: true
is-read-header: true
is-read-body: true
```

This behavior does not happen consistently and I haven't yet identified what triggers it. Do you know what could be causing this issue?

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.