You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by prabhjyotsingh <gi...@git.apache.org> on 2016/06/23 09:43:19 UTC

[GitHub] zeppelin pull request #1071: [ZEPPELIN-1052] Application does not logout use...

GitHub user prabhjyotsingh opened a pull request:

    https://github.com/apache/zeppelin/pull/1071

    [ZEPPELIN-1052] Application does not logout user when authcBasic is used

    ### What is this PR for?
    This PR is WRT to [this](http://apache-zeppelin-users-incubating-mailing-list.75479.x6.nabble.com/Fwd-Authentication-in-zeppelin-td3354.html) mail thread (Authentication in zeppelin)
    Where in if authcBasic mechanisim is used then on clicking logout, the user doesn't gets logout.
    
    
    ### What type of PR is it?
    [Bug Fix]
    
    ### Todos
    * [x] -  set username and password false on logout
    
    ### What is the Jira issue?
    * [ZEPPELIN-533](https://issues.apache.org/jira/browse/ZEPPELIN-1052)
    
    ### How should this be tested?
    In shiro.ini conf set `/** = authcBasic`, then start the zeppelin server.
     - try login as admin/password1
     - now try to logout (this should work)
    
    
    ### Questions:
    * Does the licenses files need update? n/a
    * Is there breaking changes for older versions? n/a
    * Does this needs documentation? n/a
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/prabhjyotsingh/zeppelin ZEPPELIN-1052

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/zeppelin/pull/1071.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1071
    
----
commit b3d6935fee8959169d3dd508ef2d6ab679e71754
Author: Prabhjyot Singh <pr...@gmail.com>
Date:   2016-06-23T09:37:42Z

    set username and password false on logout

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by AhyoungRyu <gi...@git.apache.org>.
Github user AhyoungRyu commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    Yeah it works well. LGTM \U0001f44d  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by minahlee <gi...@git.apache.org>.
Github user minahlee commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    @prabhjyotsingh Thanks for the fix!
    Seems like this PR is bringing CI error in master, branch-0.6:
    ```
    Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 81.986 sec <<< FAILURE! - in org.apache.zeppelin.integration.AuthenticationIT
    testGroupPermission(org.apache.zeppelin.integration.AuthenticationIT)  Time elapsed: 42.459 sec  <<< ERROR!
    org.openqa.selenium.TimeoutException: Timed out after 30 seconds waiting for org.apache.zeppelin.AbstractZeppelinIT$1@4c156b4b
    Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
    System info: host: 'testing-worker-linux-docker-8fa71dca-3379-linux-8', ip: '172.17.9.181', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-40-generic', java.version: '1.7.0_76'
    Driver info: driver.version: unknown
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
    	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:353)
    	at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:490)
    	at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
    	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:345)
    	at org.apache.zeppelin.AbstractZeppelinIT$1.apply(AbstractZeppelinIT.java:116)
    	at org.apache.zeppelin.AbstractZeppelinIT$1.apply(AbstractZeppelinIT.java:114)
    	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:238)
    	at org.apache.zeppelin.AbstractZeppelinIT.pollingWait(AbstractZeppelinIT.java:114)
    	at org.apache.zeppelin.integration.AuthenticationIT.authenticationUser(AuthenticationIT.java:109)
    	at org.apache.zeppelin.integration.AuthenticationIT.testGroupPermission(AuthenticationIT.java:177)
    Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"xpath","selector":"//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"}
    ```
    I was able to reproduce error that logout doesn't work by following:
    1. start zeppelin with default shiro.ini
    2. create `Untitled Note 1` and set permissions to (admin, admin, admin)
    3. go back to zeppelin main page (http://localhost:8080)
    4. click `Untitled Note 1`
    5. login as admin
    6. click logout button -> doesn't work
    Could you take a look please?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    @minahlee Thank you for much explanation about the issue.Have open up https://github.com/apache/zeppelin/pull/1084 to find and fix this issue, I'll try to resolve ASAP.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by Leemoonsoo <gi...@git.apache.org>.
Github user Leemoonsoo commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    Tested this branch with both authc and authcBasic and logout works well. LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by minahlee <gi...@git.apache.org>.
Github user minahlee commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    @prabhjyotsingh Thanks for quick response. The steps I wrote was just for reproducing the case that logout action doesn't work because I couldn't reproduce it in my laptop with shiro setting in `AuthenticationIT`
    
    And yes I agree that showing login button with insufficient privileges doesn't make much of sense.
    
    
    ```
    Tests in error: 
      AuthenticationIT.testGroupPermission:177->authenticationUser:109->AbstractZeppelinIT.pollingWait:114 » Timeout
    ```
    This seems to happen because it is trying to find `Login` button after logout, but cannot since logout button is not functioning.
    Attaching the screen shot from https://s3.amazonaws.com/archive.travis-ci.org/jobs/139763023/log.txt where selenium tries to find `Login` button:
    ![download](https://cloud.githubusercontent.com/assets/8503346/16345899/3ca76e74-39f9-11e6-9888-6213f9897289.png)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    @corneadoug, will surly look into it, in the mean while have created this a new jira for tracking the same https://issues.apache.org/jira/browse/ZEPPELIN-1125


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin pull request #1071: [ZEPPELIN-1052] Application does not logout use...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/zeppelin/pull/1071


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by Abhisar <gi...@git.apache.org>.
Github user Abhisar commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    Verified and It works.LGTM from me too


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    Merging this if no more discussion.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    @minahlee, Thank you for review this.
    
    With default shiro.ini i.e.
    
    ```
    /api/version = anon
    /** = anon
    #/** = authc
    ```
    
    Under `Insufficient privileges` "Login button" should not show up, sounds like a different bug to me, but if you refresh the page, the auth info will be removed.
    
    And before merging this PR, when I saw travis log, it was failing for these two, and I assumed both were unrelated.
    
    ```
    Results :
    
    Failed tests: 
      ParagraphActionsIT.testTitleButton:350 After Show Title : The title field contains
    Expected: "Untitled"
         but: was ""
    
    Tests in error: 
      AuthenticationIT.testGroupPermission:177->authenticationUser:109->AbstractZeppelinIT.pollingWait:114 » Timeout
    ```
    
    I'll open up a HOTFIX now, to fix CI.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] zeppelin issue #1071: [ZEPPELIN-1052] Application does not logout user when ...

Posted by corneadoug <gi...@git.apache.org>.
Github user corneadoug commented on the issue:

    https://github.com/apache/zeppelin/pull/1071
  
    @prabhjyotsingh I got it working on localhost:8080, but not using `./grunt serve`
    Could you take a look?
    ![logout](https://cloud.githubusercontent.com/assets/710411/16613153/b595580e-43a5-11e6-8fcb-f4ba598963a6.gif)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---