This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 9bae0a61ed [fix]Stream load 307 temporary redirection authentication
information is lost (#9363)
9bae0a61ed is described below
commit 9bae0a61edbb855cb2918deba9a28841783dd5d5
Author: jiafeng.zhang <[email protected]>
AuthorDate: Sat May 7 19:22:45 2022 +0800
[fix]Stream load 307 temporary redirection authentication information is
lost (#9363)
---
.../apache/doris/httpv2/rest/RestBaseController.java | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/RestBaseController.java
b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/RestBaseController.java
index e2763caa93..5a8c7aa1b7 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/RestBaseController.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/httpv2/rest/RestBaseController.java
@@ -75,11 +75,21 @@ public class RestBaseController extends BaseController {
String userInfo = null;
if (!Strings.isNullOrEmpty(request.getHeader("Authorization"))) {
ActionAuthorizationInfo authInfo = getAuthorizationInfo(request);
- // Fix username@cluster:passwod is modified to cluster:
username:passwod causes authentication failure
- // @see https://github.com/apache/incubator-doris/issues/8100
+ //username@cluster:password
+ //This is a Doris-specific parsing format in the parseAuthInfo of
BaseController.
+ //This is to go directly to BE, but in fact,
+ //BE still needs to take this authentication information and send
RPC
+ // to FE to parse the authentication information,
+ //so in the end, the format of this authentication information is
parsed on the FE side.
+ //The normal format for fullUserName is actually
default_cluster:username
+ //I don't know why the format username@default_cluster is used in
parseAuthInfo.
+ //It is estimated that it is compatible with the standard format
of username:password.
+ //So here we feel that we can assemble it completely by hand.
+ String clusterName = ConnectContext.get() == null ?
+ SystemInfoService.DEFAULT_CLUSTER :
ConnectContext.get().getClusterName();
userInfo =
ClusterNamespace.getNameFromFullName(authInfo.fullUserName) +
- "@" +
ClusterNamespace.getClusterNameFromFullName(authInfo.fullUserName) +
- ":" + authInfo.password;
+ "@" + clusterName +
+ ":" + authInfo.password;
}
try {
urlObj = new URI(urlStr);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]