-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to a non-Persona login system #98
Comments
It would be good to make sure we maintain the use of the same meta-files across the ecosystem. |
@nathandunn will soon do a quick evaluation of switching out the authentication system. After that, we will have a more clear idea of the next steps. |
Thanks for the update @kltm! Please let us know if you need testers or any other help. |
@kltm Short answer is that I think it can be done. You might get lucky and be able to write a different impl class and redo the binding here: and created a GithubBindingImpl.java You could use Shiro, but I would just use the github api itself since @hdietze put all of this nice work into it already: http://github-api.kohsuke.org/ maven install here: https://mvnrepository.com/artifact/org.kohsuke/github-api Pretty |
@nathandunn I'd assume that using the raw GitHub OAuth2 API here would be more work than just piggy-backing on a framework that already has all the exchanges figured out already. Looking at Kohsuke's API, it seems like it already assume a token anyways. Or am I missing something here? |
|
Using Shiro directly (as in the above example code), we should be able to handle the web application flow directly?. |
I'd think there would be some modification for the "github" flavor. |
Also, this as well . . . https://developers.google.com/api-client-library/java/google-oauth-java-client/reference/1.20.0/com/google/api/client/auth/oauth2/package-summary Trying to use the web-flow example will probably be the easiest, and removing the popup. https://developer.github.com/v3/oauth/#web-application-flow The problem is that no-one has their client_id when you call this. So, we have to register ourselves under oauth applications for TermGenie. Using the client_id from the site, it triggers authentication and the proper callback (yeah!). However, we need to make sure that the token is set properly.
|
If I'm following you, nobody should have a client id except the calling app. The registration and matching of URLs between the client and the provider is just the price that has to be paid for credential-less login. IIRC, the pieces of "secret" information that need to be on the client side (and I'm calling TG the "client" in the oauth2 process here) are:
|
Yes. That is my understanding, which I hope is correct. |
Getting "not founds" when attempting to post to get the access_token in step 2. Looking at this, it seems like I'm doing everything correctly, but will https://gist.github.com/technoweenie/419219/a10301414e3c3d2aa63cde9018920d6457741a55 Looks like the solution might be to send as FormData instead of JSON: https://gist.github.com/technoweenie/419219#gistcomment-1920651 |
From the gist:
|
@kltm I think the gist is experimental (and was helpful in getting going), but the Oath2 / developer stuff I don't think is. |
Have to use:
Looks good. . . very weird. Going up further I get:
|
Fixed. Now generating this error:
|
Basically, email is not returned:
but then somehow it is.
|
Full JSON was being returned, but should have been mapping
|
I'm not sure I'm understanding why your email is involved here. This needs to be against github ids. |
For GO, we'll be moving away (as in Wednesday) from any kind of email md5 verification and just have a direct lookup against the user's kltm username. Basically, there needs to be a way to get the current contents of users.yaml into TG. And get it updateable remotely. The current contents of termgenie-mp-user-permissions.json was initially used to seed users.yaml (along with two other files), but has since diverged a bit. Heiko was going to write something at some point to switch to the users.yaml directly instead, but never got around to it--he just did manual updates, IIRC. Anyways, the choices are to either write a conversion script to change users.yaml to the expected json format, or to write something for TG that reads users.yaml directly. The latter would be preferable as it would make making updates more transparent (and could be down with a git pull cron job on oven before TG's nightly restart), but may involve more fiddling than desired at this point. As well, there are still TG users who do not have a listed GitHub account yet, so somebody (not you @nathandunn) would have to collect that and add it to the users.yaml file. |
Now I'm getting this:
Somehow I'm not parsing or checking it right, or it is looking in another spot. More debugging. |
Not sure if you still need accounts @kltm , but this is the right change to fix geneontology/termgenie#98 with other fixes.
Getting a String Value looks like this:
|
@mcourtot, @cmungall, and @ukemi . . this should be working. Can you test http://go.termgenie.org/ and report success / failure? Thanks! |
Hi @nathandunn - testing on TG works for logging at http://go.termgenie.org/ But TG commit review doesn't seem to have the correct authorisation level (http://go.termgenie.org/TermGenieReview.html): I am logged in but "The current user (Melanie Courtot) is not allowed to use this review feature." |
@mcourtot Thanks. I'll take a look. |
@mcourtot Are there other logins / pages that also have this error so that I can check them all at once (though its probably all the same error)? |
Not as far as i know, those are the only 2 TG pages I use. |
Thanks. That will make things easier. |
TermGenieManager.html
…On Tue, Nov 29, 2016 at 10:46 Nathan Dunn ***@***.***> wrote:
Thanks. That will make things easier.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#98 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADGOeg8POF3eNdM1WtrgUb4UBoxvSN0ks5rDEjXgaJpZM4Ky7ba>
.
|
Ah thanks. Same issue here: |
Sorry to be the bearer of bug reports... the login works fine, but in the TG review itself, the commit message reads |
I am able to get into both interfaces, but when I am in the gatekeeper it says reviewed by null. |
@mcourtot @ukemi Thanks for the reports. I'll take a look. Thanks for being patient (had not worked on this stack or GH integration before last week). Local testing is a bit difficult with this stack. If there is anything else to test that you have access to, let me know so I can minimize the number of bounces on the server. Thanks.
|
It'd be good to check what happens when creating a new term in TG, as it should also pick up the user name (=creator of the request) then. For example in the above message "TermGenie commit for user: pg reviewed by mec", "pg" (aka Pascale Gaudet) create the term. Unfortunately atm TG is down due to unseat classes - geneontology/go-ontology#12834 - so not sure how to test (but presumably the user name gets passed the same way whether you create or review the query) |
Thanks. Hopefully this will fix both of those. |
Try it again . . may need to create a new commit. I updated the one that was there. |
I still get 'reviewed by null' (and it's still the same term requested by Pascale, so not sure whether there is another issue as you indicated you committed this one?) Note we can't create a new commit as long as the ontology is unsatisfiable. |
I'll wait until the ontology is fixed to see if anything further is wrong. Editing of the message must not be persisted. |
I was able to commit the term. I edited the commit message to be 'TermGenie commit for user: pg reviewed by tb' instead of 'TermGenie commit for user: pg reviewed by null' before committing. Didn't look for this thread before I did that, sorry. I'd been waiting for Pascale to get back to me on geneontology/go-ontology#12809 and she finally did. Status for commit #88703: Success
|
User reported commit issue at geneontology/go-ontology#12789 (comment) I just added the GH account to the users.yaml file, but I'm not sure why he would be able to log in and not commit. (Or how he could login without having a 'known' GH account) Edit: Bob clarified that he logged in using username and password, which would indicate Persona login. Probably the lack of GH ID means the system reverted to using Persona? Persona would then be used to log in, but the commits require having a GH ID, so he was prevented from actually creating a commit? Seems like a plausible explanation, but leaving it to the experts to confirm :) |
Originally from geneontology/go-ontology#12795
"Persona is no longer actively developed by Mozilla. Mozilla has committed to operational and security support of the persona.org services until November 30th, 2016. On November 30th, 2016, Mozilla will shut down the persona.org services. Persona.org and related domains will be taken offline. If you run a website that relies on Persona, you need to implement an alternative login solution for your users before this date. For more information, see this guide to migrating your site away from Persona: https://wiki.mozilla.org/Identity/Persona_Shutdown_Guidelines_for_Reliers"
Minutes from call, http://wiki.geneontology.org/index.php/Ontology_meeting_2016-10-27#persona.org
Chris: you’ll see this reflected first in Noctua; will be able to log in via GH or Google; that’ll happen before the GOC mtg. For TG, we’ll probably use the same mechanism we use for Noctua. TG may have to be down for a week or so during that change.
The text was updated successfully, but these errors were encountered: