geneontology / noctua

Graph-based modeling environment for biology, including prototype editor and services
http://noctua.geneontology.org/
BSD 3-Clause "New" or "Revised" License
36 stars 13 forks source link

Barista login seems to fail in some cases #385

Closed mcourtot closed 7 years ago

mcourtot commented 7 years ago

Reported by @deustp01

I go to noctua.berkeleybop.org, click the log-in button at the top right of the page, and get to this "Session login" page: http://barista.berkeleybop.org/login?return=http://noctua.berkeleybop.org/ . I click the "Sign in with GitHub" link and instead of getting the GitHub login page that takes a username and password as predicted in the documentation, I get this page: http://barista.berkeleybop.org/login/success?barista_token=null&return=http://noctua.berkeleybop.org/\, which says

Login Success Session status You are not currently logged-in

You may generate a new working token by clicking the [Login] button below. As it stands now, the token will be good until the next Barista restart.

If I click the [Login] button on the page I get taken back to the previous page. If I click the [Return] button I get taken to the Noctua home page, which still shows the Login button at the upper right and complains about errors in generating my token but dismissing the complaints gets me the home page and now I have edit powers. Is that intended behavior? And how do I log out?

mcourtot commented 7 years ago

I just tried again and this seems to work fine for me. May I suggest a few tests? That may help @kltm pinpoint the issue. (1) I was already logged in into Github, and Barista (the Noctua login manager) automatically recognized those credentials from my browser session. Could you try login into your github account at https://github.com and navigate back to Noctua? (2) Can you try login into TermGenie and check whether you can get to the logged in status? (3) I had (unrelated) login issues in the past with Noctua - could you try in another browser if you have one installed?

deustp01 commented 7 years ago

I logged out of everything, went to https://github.com, was required to log in there and did that successfully, then pointed my browser at noctua.berkeleybop.org, and got the home page with the login button showing (white). When I clicked on a button to edit a diagram, the diagram the diagram opened but when I tried to do something, I (fortunately) got a "not logged in" error message.

When I go to go.termgenie.org, and click the Log In item in the upper right, the page refreshes to show Peter D'Eustachio logged in.

I'm using Firefox 50.0.1 on a Windows 7 machine. It looks like I get the same Noctua behavior with IE10 (not sure that's current enough for you).

kltm commented 7 years ago

@deustp01 If I'm reading this correctly, the problem is a misunderstanding. Noctua login is not literally through GitHub, but rather we reuse a bit of their infrastructure for our own login.

If you go to Noctua, there will be a login buttin in the upper right. Click that, select github, and login through there. You will then come back to a similar page, where you should click the "Return" button.

A more detailed discussion can be found here: https://github.com/geneontology/go-site/blob/master/documentation/application-logins.md

deustp01 commented 7 years ago

I don't think so. When I go to the log in page with the cartoon dog and log in with my Noctua email and password, I get a "wrong login information" error. If I use my gGitHub information (same email, different password) I log in successfully, and "return"ing to Noctua gets me a pop-up window that says "There was a manager eorror (success): bad response" Dismissing that pop-up gets me a second one that says "You seem to have a bad token; will try to clean". Dismissing that one gets me the Noctua page but with obly view capability, no editing. David Hill and I went through this together via Skype with screen sharing, so we're pretty sure that it's not that I'm hitting wrong buttons.

kltm commented 7 years ago

@deustp01 Hm. I'll walk through this from my side.

There should be no such thing as a "Noctua email and password" anymore. For a while, when we farmed our authentication to Persona, people had an email address and associated password that they used with the Persona system to prove who they are. We now farm our authentication out to GitHub, so people should be using their GitHub (email or username) and password to login. From your description, it sounds like you're doing everything right. The second type of error that you're getting really seems like a meta-information problem, but I've taken a look at your meta-information in the system, and it seems to be correct. Although it might be nice to add your ORCID if you have one...

So, where to go from here... There are a few possibilities, so we'll need to start eliminating them.

I've done an explicit refresh of the user data. Could you try again, using your github information? When you get to a screen like this:

screenshot_2016-12-02_16-05-43

Could you given me your name, color, and token, as well as the entire URL of the page that you are on?

Thank you for your patience on this. It is quite odd.

deustp01 commented 7 years ago

Clear cache, delete history, remove any noctua cookies. Go to Noctua OK, ask to log in, get page with dog cartoon, log in with GitHub user email and password. Now get a different result than yesterday! Now, I get to this page http://barista.berkeleybop.org/login/success?barista_token=XXXXXXXXXXXXXXXXXXXXXX&return=http://noctua.berkeleybop.org/ with this information: name Peter D'Eustachio color blue token XXXXXXXXXXXXXXXXXXXXX

Yesterday, while I got a page asserting login success, it never gave a color or a token. Now, when I hit "return", I get back to the Noctua home page with its list of projects and no complaining popup windows, and I have edit power over the models listed there. Also, the logout button in the upper right corner of the page now works.

So it looks like whatever you did made the problem go away. Thanks for your persistence!

My ORCID is 0000-0002-5494-626X

kltm commented 7 years ago

@deustp01 I'm glad it's working now, but I tried a bunch of things that shouldn't have made a difference (your metadata was solid, you've been in the system a while, etc.) and you tried some things that shouldn't have made a difference (cache clearing, history, etc.), yet one (or more) or those things was it. I wish we knew which one it was for future reference, but I think clearing the issue quickly was for the best here. Apologies for the hiccup, and thank you for your patience.

kltm commented 7 years ago

Edit to remove the token info in the ticket.

mcourtot commented 7 years ago

FWIW, I had run into this issue (or a similar one) some time ago. @kltm had bounced the server (I believe this was when the ICBO users were added last year) and that solved the issue. Not very helpful to debug, but may indicate an issue more on the side of session handling than GH credentials?

kltm commented 7 years ago

I'm pretty sure that the GitHub part is rock-solid--the browser sessioning (refresh) and metadata bits are the likely cause. However, to go through and control all of the for somebody else's login has been a bit of a trick. I'm hoping to be present the next time this happens.