[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-05-10 Thread nichunen (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16836969#comment-16836969
 ] 

nichunen commented on KYLIN-3474:
-

Committed to 2.6.x branch

> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.3.0, v2.4.0, v2.5.0, v2.6.1
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Fix For: v2.6.2
>
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-03-26 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16802398#comment-16802398
 ] 

ASF subversion and git services commented on KYLIN-3474:


Commit 8bd1c93eb1db099c08ec20bf56ffbc4d261ca2b1 in kylin's branch 
refs/heads/2.6.x from Temple Zhou
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=8bd1c93 ]

KYLIN-3474 Tableau 10.5 get malformed token


> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.3.0, v2.4.0, v2.5.0, v2.6.1
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Fix For: v2.6.2
>
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-03-20 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797752#comment-16797752
 ] 

ASF subversion and git services commented on KYLIN-3474:


Commit 14d0a37cbc93c1fd05d6b815011cbe6b8923503c in kylin's branch 
refs/heads/master from Temple Zhou
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=14d0a37 ]

KYLIN-3474 Tableau 10.5 get malformed token


> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.3.0, v2.4.0, v2.5.0, v2.6.1
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Fix For: v2.4.1, v2.4.2
>
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-03-20 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797751#comment-16797751
 ] 

ASF GitHub Bot commented on KYLIN-3474:
---

shaofengshi commented on pull request #536: KYLIN-3474 Tableau 10.5 get 
malformed token
URL: https://github.com/apache/kylin/pull/536
 
 
   
 

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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.3.0, v2.4.0, v2.5.0, v2.6.1
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Fix For: v2.4.1, v2.4.2
>
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-03-19 Thread Temple Zhou (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16796732#comment-16796732
 ] 

Temple Zhou commented on KYLIN-3474:


{code:java}
public class KylinUserManager {

private static final Logger logger = 
LoggerFactory.getLogger(KylinUserManager.class);

public static KylinUserManager getInstance(KylinConfig config) {
return config.getManager(KylinUserManager.class);
}

// called by reflection
static KylinUserManager newInstance(KylinConfig config) throws IOException {
return new KylinUserManager(config);
}

// 


private KylinConfig config;
// user ==> ManagedUser
private CaseInsensitiveStringCache userMap;
private CachedCrudAssist crud;
private AutoReadWriteLock lock = new AutoReadWriteLock();
{code}

The userMap is case-insensitive, so I can authenticate successfully with 
uppercase or lowercase username,but 
org.apache.kylin.rest.security.ManagedUser#equals compare the username in a 
case sensitive method. 

org.apache.kylin.rest.security.KylinAuthenticationProvider#authenticate
{code:java}
String username = user.getUsername();
logger.debug("User {} authorities : {}", username, 
user.getAuthorities());
if (!userService.userExists(username)) {
userService.createUser(user);
} else if 
(!userService.loadUserByUsername(username).equals(user)) {
// in case ldap users changing.
userService.updateUser(user);
}
{code}

Finally, the userService.loadUserByUsername(username).equals(user) will always 
be false, and the 
org.springframework.security.provisioning.UserDetailsManager#updateUser will be 
called many times per second.

> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.3.0, v2.4.0, v2.5.0, v2.6.1
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Fix For: v2.4.1, v2.4.2
>
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-03-19 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16796729#comment-16796729
 ] 

ASF GitHub Bot commented on KYLIN-3474:
---

TempleZhou commented on pull request #536: KYLIN-3474 Tableau 10.5 get 
malformed token
URL: https://github.com/apache/kylin/pull/536
 
 
   
 

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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.3.0, v2.4.0, v2.5.0, v2.6.1
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Fix For: v2.4.1, v2.4.2
>
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-01-04 Thread Temple Zhou (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733998#comment-16733998
 ] 

Temple Zhou commented on KYLIN-3474:


Hi [~Aron.tao] 
Oh, you are right, my kylin version is 2.4.0, and the KYLIN-3562 had fixed the 
issue, I will close it(y)

> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.3.0, v2.4.0
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-01-04 Thread Jiatao Tao (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733993#comment-16733993
 ] 

Jiatao Tao commented on KYLIN-3474:
---

Hi [~temple.zhou]

In my opinion, the true problem is the wrong update user logic when 
authenticating.

 

In the past, Kylin will update the user per authentication, and after 
KYLIN-3562, it has been removed, so there won't be so many 
updates.(https://issues.apache.org/jira/browse/KYLIN-3562)

 

And I think it's reasonable to clear cache when the user has been updated.

 

 

> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.3.0, v2.4.0
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2019-01-04 Thread Temple Zhou (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16733915#comment-16733915
 ] 

Temple Zhou commented on KYLIN-3474:


Hello~

Can anyone review the patch?

I remove the following lines

{code:java}
public void updateUser(UserDetails user) {
Preconditions.checkState(user instanceof ManagedUser, "User {} is not 
ManagedUser", user);
ManagedUser managedUser = (ManagedUser) user;
getKylinUserManager().update(managedUser);
logger.trace("update user : {}", user.getUsername());
setEvictCacheFlag(true);  // removed
}
{code}

As I found that "setEvictCacheFlag(true)" will made the userCache in 
KylinAuthenticationProvider invalid forever. Every RESTfull API Call will be 
auth by authenticationProvider instead of using the userCache, which will 
contribute to the malformed token with large concurrency and let the LDAP 
server more pressure.

> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.4.0
>Reporter: Temple Zhou
>Assignee: Temple Zhou
>Priority: Major
> Attachments: KYLIN-3474.master.001.patch, kylin.log, 
> tableau-malformed-token.png
>
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.
> Now, I just annotate the following 
> lines(org.apache.kylin.rest.security.KylinAuthenticationProvider 84-87) and 
> the Tableau 10.5 can run regularly with Kylin 2.4.0(multi-query).
> {code:java}
>  @Override
> public Authentication authenticate(Authentication authentication) throws 
> AuthenticationException {
> byte[] hashKey = hf.hashString(authentication.getName() + 
> authentication.getCredentials()).asBytes();
> String userKey = Arrays.toString(hashKey);
> // if (userService.isEvictCacheFlag()) {
> // userCache.invalidateAll();
> // userService.setEvictCacheFlag(false);
> // }
> Authentication authed = userCache.getIfPresent(userKey);
> if (null != authed) {
> SecurityContextHolder.getContext().setAuthentication(authed);
> } else {
> {code}
> I don't know if you tested the Kylin(multi-query) Cluster Mode with Tableau?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3474) Tableau 10.5 get malformed token (multi-query instance)

2018-08-08 Thread Temple Zhou (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16574354#comment-16574354
 ] 

Temple Zhou commented on KYLIN-3474:


[~albertoramon]

I'm sorry, I can't find a solution except annotating the above lines. As even I 
conf the session persistence in the LB (Nginx Session Sticky), the problem 
still exists.

> Tableau 10.5 get malformed token (multi-query instance)
> ---
>
> Key: KYLIN-3474
> URL: https://issues.apache.org/jira/browse/KYLIN-3474
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine, Security
>Affects Versions: v2.4.0
>Reporter: Temple Zhou
>Priority: Major
>
> I found that when I use Tableau 10.5 with Kylin 2.4.0(multi-query) , the 
> Tableau Server will get the malformed token error when do query via restful 
> API.
> However, when I use Tableau 10.5 with Kylin 2.4.0(single query instance), the 
> error will be gone.
> Now, I just annotate the following 
> lines(org.apache.kylin.rest.security.KylinAuthenticationProvider 84-87) and 
> the Tableau 10.5 can run regularly with Kylin 2.4.0(multi-query).
> {code:java}
>  @Override
> public Authentication authenticate(Authentication authentication) throws 
> AuthenticationException {
> byte[] hashKey = hf.hashString(authentication.getName() + 
> authentication.getCredentials()).asBytes();
> String userKey = Arrays.toString(hashKey);
> // if (userService.isEvictCacheFlag()) {
> // userCache.invalidateAll();
> // userService.setEvictCacheFlag(false);
> // }
> Authentication authed = userCache.getIfPresent(userKey);
> if (null != authed) {
> SecurityContextHolder.getContext().setAuthentication(authed);
> } else {
> {code}
> I don't know if you tested the Kylin(multi-query) Cluster Mode with Tableau?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)