Closed (outdated)
Project:
SAML Authentication
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Plan
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2016 at 22:48 UTC
Updated:
25 Mar 2017 at 15:20 UTC
Jump to comment: Most recent
Comments
Comment #2
droath commentedComment #3
droath commentedComment #4
roderikHi droath,
The more the merrier, I would guess!
cweagans is super busy previous/this month. As a result of communication in #2753607-4: Redo SamlUserService, I've been trying to get a 'Works For Our Clients' version together that builds upon externalauth, in august. (because 8.x-1.3 is not an option.) cweagans has agreed to just push this to a 2.x-alpha0 version for the time being, after a quick review/approval. And he's not opposed to aggressive refactoring.
I don't have full co-maintainer rights / write rights to the repo. But maybe we can prepare some chunks that are slightly more bite-size than your current commit, and queue them up for final review by cweagans? (In whatever way you want. Commits on (y)our github repo(s), or patch files here... Code discussion on github or here... I think I'm in favor of at least creating d.o issues that at least generally mention what we're working on, even if the rest of the work is on github. Idunno, we can see.) Then we can discuss maintainership after.
So, question 1: do you have time to do some sparring together, wait for the maintainer and present him with some things to further review? (Or are you on a "my code needs to be ready and tagged before date X" deadline like I was? I hope you're not, because your changes are... considerable. Also I don't have heaps of time.)
I gave your code a look-over, and first impressions:
It looks like you just created your git repo quickly for the benefit of this d.o issue. (Maybe you have some more 'bite size' changes lying around?)
This brings me to question 2 and 3:
* Are you still working on things? Or done?
* I'm sure there are at least some separate changes you could split out into separate commits/issues. Can you do that please? (Or tell me if I'm wrong about that.) I'm sure you are more suitable than me to judge the dependencies / to see which things should come first.
And I know it sucks that you might have to revert parts of your code, just to be able to present a working module with only parts of your changes applied. But yeah... for an open source module that several people are working on, this is just too big of a change to review/include in one commit. I don't see a good way around that -- and that's also why I crafted some 'in between commits' on the way to what is now 2.0-alpha0, which showed some evolution / separated changes.
Also (paraphrasing cweagans): before an actual 2.0 comes out there will have to be more unit/functional tests included.
Comment #5
droath commentedHi Roderik -
Thanks for getting back to me. Yes the code that is in my GitHub account will need to be deployed soon for the project that I'm working on, but I don't think we need to rush a release because of that. I think it's a good idea that we create a d.o issue stating we're working on a 2.x branch. In that issue we'll state that the development is happening on GitHub (this can be my repo or yours, although I did a lot or refactoring. Might be easier to migrate your changes into my repo, but we can discuss) for now. I personally prefer GitHub PR's instead of the d.o patch workflow. What do you like better?
I do apologize for the one large commit, I don't have any bite size changes laying around. I didn't think I was going to be doing this much refactoring when I initially started the project. I'm still actively developing on some remaining features the client needs but it should be pretty minimal. Those features will be pushed into the GitHub project. Yes it's going to take a bit of time but I think you're right that I'll need to rebase the one large commit into smaller bite-size changes so they can be easily reviewed by the maintainer.
I was planning on writing some more test coverage (unit/functional) after the large refactor, just didn't have time in the current project timeline. I can do that in my spare time after we get started on the next phase of the 2.x branch.
So the next steps are:
- Create an d.o 2.x issue stating we're working on GitHub for now (as it's easier for collaboration in my opinion)
- If we decide to use my repo, I'll need to rebase the commit into smaller bite-size commits (it would be nice to get the maintainer to sign-off on the direction on the refactor so I didn't have to do that). I'm more then willing to meet via Google Hangout to go into detail about why I architected it the way I did.
- Then migrate your changes into my GitHub repo that I can give you commit access too.
Do those next steps sound good to you?
Comment #6
cweagansHey, sorry for the slow follow up here. All of the above sounds great. roderik already has write access on d.o. I'm not opposed to adding droath, but I'd like to see more bite-sized commits for some of the changes (which look excellent).
As roderik noted, I'm very busy this month (getting married on the 24th) and I'll be completely offline between Oct 7 and Oct 22 for my honeymoon.
Feel free to run with whatever you think is appropriate. If you want feedback, feel free to ping me via my contact form. I may be a little slow to reply, but I'll definitely get back to you. Please don't tag a release for now - I want to review more fully before doing that.
Comment #7
roderik@cweagans - I'm not sure I have write access to the repo; I tried a 'no-op push' once and d.o gave me an error. I may give you a quick ping in PM if necessary. But I'm not concerned about that now because if we're working on changes this big... it may be better to stick to github anyway. I don't want to completely overhaul the module and then push it while you're away. Or at least not tag it.
@droath:
I'm fine with Github PRs. (Minor thing: there's a manager at my first-line employer who pushes everyone to create d.o issues for any nontrivial contribution they make, so we can score attribution points ;-) But I can ignore him if necessary. Haven't decided yet.)
Let's take the starting position for now that "the two of us will have to convince the maintainer to accept whatever we come up with". We might be in a unique position at this moment, where we can get away with just including your huge change in one go - because we're making big changes anyway. If one concern is cleaned up... and given that you're willing to write tests... IMHO there is a case for just taking your branch and letting you spend time on writing tests which ensure that the module works, rather than spending that time on breaking up the changes in parts, and then discussing them.
The one concern I have is this:
The current module has a feature where if an already-existing Drupal account has the same e-mail address as the SAML user that is being logged in for the first time... the existing account is linked to that user, rather than a new account being created. And I am soon (going to have clients nagging me about) extending that to also include "if an existing account has the same user name as the SAML user, link that account". Just like simplesamlphp_auth module does too.
My question is: does your module still have that 'link existing accounts' functionality? (And if so: is the 'link by name' also possible?) I couldn't see it from trying to parse your code changes in my brain only.
If that is the case: never mind the next paragraph. I'm OK with working on github / using your branch as the main one and doing PRs against it for anything I'd want to change. We can retitle this issue to "8.x-2.x branch" and refer to your repo. I'm personally busy / will do almost nothing until the 18th/19th, but if you want to discuss some strategy / want reassurance that I'm behind this, we can do a hangout. And after the 18th feel free to kick my ass repeatedly about working with you. (I will have to write that config-values migration at the very least.)
If that is not the case: we're going to have to have a discussion about that because this is a serious regression which IMO should block the adoption of your code until it is resolved. We have several ways of addressing this I think, but they're either time consuming or will 'break' the clean-ness of your code. If we need to do a hangout about that, let me know. I'm in the EU timezone so not your evenings.
Comment #8
droath commented@roderik
We can use the d.o issue queue to state the problem we're trying to solve or have issues with. Then use GitHub to only house our code changes, we'll just tag each commit with the d.o issue number. Once we merge the commits from GitHub into the d.o project repo then you'll get credit for all commits you've done. Does that sound good?
I agree with you that I would rather spend my time writing tests then rebasing that one large commit into smaller parts. I feel that's more beneficial time-wise for us moving the project along. I've created an issue in GitHub (https://github.com/droath/samlauth/issues/3), which I can repost in the d.o issue queue if needed.
Unfortunately I don't have support to link an existing Drupal account to a SAML user when their account is initially created. Unless the external authentication module is doing something like that when I call the register() method. If anything I can add that functionality into my project as I don't think it will take to long to get it working.
Comment #9
droath commented@roderik
I've added the account linking feature into my GitHub repo. If you want you can review the changes of the PR (https://github.com/droath/samlauth/pull/5). My current implementation of the account linking feature allows you to link SAML accounts basically on any combination of Drupal user properties. This is all configurable in the user mapping section.
I'll be working on writing the test to ensure the refactor of this project didn't break anything.
Comment #10
roderikThanks! I hope to get to some serious manual-testing by the next weekend, so I can either have feedback or recommend this to customers / write the upgrade path from alpha0.
Comment #11
seanbI've added some patches for the 2.x dev branch in the issue queue. What is the plan for the next alpha/beta? Is the development switching to github? What is the main place where the development is happening at the moment? If the dev version in the project page is not the last version, could we fix this?
Please let me know, I have time to work on the module/test it in a project I'm currently working on! If needed I can update my patches to work with the latest version.
Comment #12
roderikThanks for your message and the helpful attitude / offer for cooperation. It seems there's a nice party of people who want to work on this now; we just need to get things coordinated better.
In that process, I'm the delay at the moment. Sorry for not responding sooner; I haven't had time to get to this yet (and have not talked to cweagans since the messages in this thread).
Since my upcoming weekend is longer, I will likely get to reviewing/testing droath's branch then. (Have the vague feeling that I will mostly say "this is awesome" but will have some absolute requirements, before an alpha1 can be rolled. For which I'll need to write the proposed patches myself, plus an upgrade path.)
After that, we can
* roll an alpha 1
* have a clear 'authorative version' of the module again / have everything in the drupal.org repo
* decide on the development model, going forward
* find out what we need to do remove any bottlenecks (like unresponsive co-maintainers) if still necessary.
If you have time right now and could port your patches to droath's latest, that would be great. I can't promise 100% that this will be the authorative version without having reviewed it and pinged cweagans to review it, but it seems very likely. (You can either post patches here or PRs against droath's branch if necessary. I'll figure it out by saturday/sunday/monday.)
Comment #13
seanbThanks for your reply! I have time in the coming weeks so I will wait untill monday. If you need any help let me know, I will check out droath's branch in the mean time as well.
Comment #14
seanbJust installed droath's version. Everything seems to work well, the settings and options look relatively easy to migrate. There are also some nice extra features and tests, so I'm all for using that version.
Some thoughts:
Some extra improvements (for some there are already issues in the issue queue):
What is the best way forward? Add droath's version as 8.x-2.x-dev and start working from there? Doing work on d.o. and github is a bit confusing? It might help people spot the new version and help test it? The migration path seems to most import task, maybe that should be done first. I probably have time to do it if you agree.
Comment #15
roderikAwesome. I say go ahead with the migration path whenever you want. I'm behind you (still finishing up work from this week), so the first thing I will do this weekend is look at droath's source code and verify your thoughts.
Let's work from droath's version; best would probably to push your work to a temporary github repo for the time being . When all of us are synced up, this should indeed become the 8.x-2.x version and I'll ask cweagans to step in. (Last time I didn't have write access for the d.o repo yet but I think that's a little oversight -- which I didn't mind because I haven't done any significant work on it after my patches from a few months ago.) Then cweagans can tag a new version which we can direct people to.
Comment #16
droath commented@seanB @roderik
I can add the missing features into the GitHub issue queue, if we're all in agreement that we're moving forward with using GitHub for the initial development? Then we can start assigning who's working on what feature. I'm open to adding both of you as collaborators to the GitHub project, or we can use the fork and pull request workflow, whatever is the easiest.
I agree that we should make the login/logout redirect a URL path instead. Also adding more description around how the account linking feature works, with some UI cleanup is also good. The "Account Username token" is used for changing how the username is displayed in the SAML user menu block (which allows you to use SAML assertion attributes).
Comment #17
roderikI do not, though, want to *force* anyone on github. If they want to keep working in the d.o issue queue that is good. Also, any time I have any need for discussion that needs to be documented, I'll open up an issue here on d.o.
And I do agree that the version discrepancy needs to be resolved very soon by pushing recent commits into the d.o repo.
I'm not there yet though. I've been trying to fit the new version source code into my head today (and am doing unimportant little code standard edits that one does during a review)... but not that fast. I'll probably be ready this monday.
Comment #18
pcambraI think we should try to push @droath version into 2.x branch here. If we opt for developing forward in github, it needs to be stated really clearly in the module page and the issue tracker closed to avoid confusion.
I can help with some bits once I know where to put the patches in :)
Comment #19
seanbI created a pull request to port existing config to the new way things are saved. https://github.com/droath/samlauth/pull/7
I added the 'change password service' field to not lose any settings, but I haven't added the routing for this yet. That's a seperate request I think?
I think it's safe to update now. Could we get this committed on github and add the latest version into 2.x branch on d.o.? After that we can figure out which changes/features are needed the most.
Comment #20
roderikSorry for being the delay here, guys. But since I got the co-maintainer job right before you showed up (which we can rectify later)... and since I have a vested interest in getting an upgradable/stable v.2.x series... and since I want to be able to stand behind what I tell the original maintainer of this module before I let him tag a new version... I want to do this properly.
Wrapping my head around the details of some of the code design of this completely new branch, is taking longer. I will continue in the evenings and have a list of questions ready a.s.a.p. (I'm thinking of opening a different issue for code related questions about the new architecture, so we can keep this for discussing the mechanics of the way forward to stable 2.x)
In the meantime I
* have pushed a 'master' branch to the drupal.org repository (which is completely not-ideal, I know, but I want to merge the current 8.x-2.x into it only when more details are clear to me)
* plan to do any work that comes with keeping track of the different versions, until I do this merge.
* will take #2670118 into it as soon as I'm done reviewing because @droath has agreed to the concept - thanks for the reroll @seanB
Comment #21
roderikHi all,
Well, this is a bit awkward...
There are some open questions in my mind about
* the basic design of the SamlAuth* class(es) and the new event;
* some settings, and the UI paradigm of the user field-mapping feature. (Which, combined with the existing-account-linking feature, is going to need some work before it's ready.)
I know 'alpha0' is alpha too, but I am currently unsure whether it's wise to switch to the droauth branch. I know incorporating the code piece by piece is going to be more work (which is why I initially didn't want to force @droath to do that), but I'm on the fence of doing that instead. Depends on the answers and your opinions.
Obviously I'll invest work in doing that (and credit droath in commits). I should have time this weekend again.
Opening a few other issues with questions; links coming up. (Edit: mainly #2824490: [droath branch] questions on design and #2824505: [droath branch] Entity ID type "url" + using the NameID attribute as unique ID.)
Comment #22
seanbDoing the patches I found that the current alpha0 version of the module is indeed much simpler in it's approach. The main reason for switching to droath's version for me was:
The field mapping would be a much wanted feature. Starting with a event to let custom modules do some custom changes to the user based on attributes would already solve this for me in the short term (and we should have this anyway).
The login/logout redirect URLs should be patched in both versions to allow paths in stead of routes. I wrote patches for both versions so there is no difference there.
Test should be added, but from a functional point of view this is not a priority for me.
Comment #23
roderikGiven
...this issue can be closed.
I'm still in the process of porting the mapping UI to the latest 8.x-2.x-dev version. I believe everything else has been handled.