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:00:39 UTC

[GitHub] [kylin] Syleechan opened a new pull request, #2040: [KYLIN-5310] fix spring session timeout config not work issue when th…

Syleechan opened a new pull request, #2040:
URL: https://github.com/apache/kylin/pull/2040

   …e session store-type is jdbc
   
   ## Proposed changes
   
   Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
   
   ## Branch to commit
   - [ ] Branch **kylin3** for v2.x to v3.x
   - [ ] Branch **kylin4** for v4.x
   - [x] Branch **kylin5** for v5.x
   
   ## Types of changes
   
   What types of changes does your code introduce to Kylin?
   _Put an `x` in the boxes that apply_
   
   - [x] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x] I have created an issue on [Kylin's jira](https://issues.apache.org/jira/browse/KYLIN), and have described the bug/feature there in detail
   - [x] Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
   - [x] Compiling and unit tests pass locally with my changes
   - [x] I have added tests that prove my fix is effective or that my feature works
   - [ ] I have added necessary documentation (if appropriate)
   - [ ] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at user@kylin.apache.org or dev@kylin.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #2040:
URL: https://github.com/apache/kylin/pull/2040#issuecomment-1333148048

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_kylin&pullRequest=2040)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2040&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2040&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2040&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=CODE_SMELL)
   
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2040&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2040&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2040&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2040&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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


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

Posted by GitBox <gi...@apache.org>.
Syleechan commented on code in PR #2040:
URL: https://github.com/apache/kylin/pull/2040#discussion_r1036657949


##########
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:
   this issue is caused by store-type override, so if changed the version,  the override issue still exist. 



-- 
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


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

Posted by GitBox <gi...@apache.org>.
Syleechan commented on code in PR #2040:
URL: https://github.com/apache/kylin/pull/2040#discussion_r1036655515


##########
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:
   it works too.



-- 
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


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

Posted by GitBox <gi...@apache.org>.
hit-lacus commented on PR #2040:
URL: https://github.com/apache/kylin/pull/2040#issuecomment-1334817889

   LGTM


-- 
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


[GitHub] [kylin] hit-lacus merged pull request #2040: [KYLIN-5310] fix spring session timeout config not work issue when th…

Posted by GitBox <gi...@apache.org>.
hit-lacus merged PR #2040:
URL: https://github.com/apache/kylin/pull/2040


-- 
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


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

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on PR #2040:
URL: https://github.com/apache/kylin/pull/2040#issuecomment-1333161301

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_kylin&pullRequest=2040)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2040&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2040&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_kylin&pullRequest=2040&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_kylin&pullRequest=2040&resolved=false&types=CODE_SMELL)
   
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/0-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2040&metric=new_coverage&view=list) [0.0% Coverage](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2040&metric=new_coverage&view=list)  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2040&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_kylin&pullRequest=2040&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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