You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by be...@apache.org on 2025/08/05 13:37:50 UTC
(streampark) branch dev updated: [Improve] flink webUI proxy support with simple auth (#4274)
This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampark.git
The following commit(s) were added to refs/heads/dev by this push:
new 67682ff6b [Improve] flink webUI proxy support with simple auth (#4274)
67682ff6b is described below
commit 67682ff6b0008a8540a72153075ccbe149c2aaa6
Author: wuzhenhua <10...@users.noreply.github.com>
AuthorDate: Tue Aug 5 21:37:44 2025 +0800
[Improve] flink webUI proxy support with simple auth (#4274)
---
.../streampark/console/core/service/impl/ProxyServiceImpl.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProxyServiceImpl.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProxyServiceImpl.java
index 59dbd3004..591353023 100644
--- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProxyServiceImpl.java
+++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProxyServiceImpl.java
@@ -17,6 +17,7 @@
package org.apache.streampark.console.core.service.impl;
+import org.apache.streampark.common.util.HadoopConfigUtils;
import org.apache.streampark.common.util.HadoopUtils;
import org.apache.streampark.common.util.YarnUtils;
import org.apache.streampark.console.core.entity.ApplicationLog;
@@ -228,9 +229,11 @@ public class ProxyServiceImpl implements ProxyService {
setRestTemplateCredentials(ugi.getShortUserName());
return ugi.doAs(
(PrivilegedExceptionAction<ResponseEntity<?>>) () -> proxy(request, url, requestEntity));
- } else {
- return proxyRequest(request, url);
}
+ if (YarnUtils.hasYarnHttpSimpleAuth()) {
+ return proxyRequest(request, String.format("%s?user.name=%s", url, HadoopConfigUtils.hadoopUserName()));
+ }
+ return proxyRequest(request, url);
}
private ResponseEntity<?> proxy(