You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2022/12/01 03:12:25 UTC

[GitHub] [kylin] Mukvin commented on a diff in pull request #2040: [KYLIN-5310] fix spring session timeout config not work issue when th…

Mukvin commented on code in PR #2040:
URL: https://github.com/apache/kylin/pull/2040#discussion_r1036650340


##########
src/metadata-server/src/main/java/org/apache/kylin/rest/controller/NUserController.java:
##########
@@ -478,6 +482,7 @@ public EnvelopeResponse<String> updateUserPassword(@RequestBody PasswordChangeRe
     @ResponseBody
     public EnvelopeResponse<UserDetails> authenticate() {
         EnvelopeResponse<UserDetails> response = authenticatedUser();
+        checkSessionStoreType(KylinConfig.getInstanceFromEnv());

Review Comment:
   When we change the spring-session version from kylin special version to community version, is this ok?



##########
src/metadata-server/src/main/java/org/apache/kylin/rest/controller/NUserController.java:
##########
@@ -636,4 +641,15 @@ private void checkUserGroupNotDuplicated(List<SimpleGrantedAuthority> groups) {
             throw new KylinException(REPEATED_PARAMETER, "authorities");
         }
     }
+
+    private void checkSessionStoreType(KylinConfig env) {
+        String type = env.getSpringStoreType();
+        HttpServletRequest request =
+                ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes()))
+                        .getRequest();
+        //todo other session store-type
+        if (type.equals("jbdc")) {

Review Comment:
   "jdbc".equals(type)) is strongly recommended.



-- 
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: issues-unsubscribe@kylin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org