[Description updated to accurately describe current revised version of project:]
"Shibboleth Users" is a module that allows administrators to control the provisioning of Drupal accounts for authentication via the shib_auth contrib module.
The module enables an extra option, "Provision Shibboleth Authentication", in the user registration and user profile forms. When this option is enabled the module creates the necessary rows in the authmap and shib_authmap tables to enable access. The module can be configured to match the Shibboleth attribute which will be used as the unique identifier: email address, username, or EPPN (with configurable domain)
This project was written as a dependent module rather than an enhancement to shib_auth because the functionality it provides may not be desirable to all users of shib_auth (some portion of whom may prefer for all Shibboleth users to self-register at first login. Some users have voiced a desire for something like this module.
I am relatively new to Drupal but I have over fifteen years of professional software development experience, primarily in Ruby and Java. My own need for a module like this arose out of my current work toward converting my employer's primary website from another CMS to Drupal. We are working with Palantir on this project, and I have been fortunate to benefit from the wisdom and experience of agentrickard, Dave Reid, crell, and jensimmons.
Project page: http://drupal.org/sandbox/svenaas/1441766
Git clone: git clone --branch 7.x-1.x svenaas@git.drupal.org:sandbox/svenaas/1441766.git shibboleth_users
Drupal version: 7, shib_auth version 7.x-4.0
Reviews of other projects:
Comments
Comment #0.0
svenaas commentedMinor rewording in description.
Comment #1
svenaas commentedComment #1.0
svenaas commentedUpdated description to elaborate on need for this module and to provide some information about my own background.
Comment #1.1
svenaas commentedAdded link to review of another project.
Comment #1.2
kingandyAdded link to another review.
Comment #3
svenaas commentedAdding "PAReview: review bonus" tag.
Comment #4
agentrickardAs noted above, we're working with Sven on this, and the code looks good so far.
Coder returns two minor notes:
Other notes:
*
shib_user_form_altershould useshib_user_form_user_register_form_alterinstead of the IF statement.It does look like this is a stand-alone module and not a feature request of shib_auth.
Comment #5
svenaas commentedThanks for the review (and the encouragement), Ken. I've fixed the two spacing issues and re-pushed. I had checked everything out in PAReview already and fixed a lot of stuff, but it didn't find this. I'll run my projects through Coder as well in the future.
I had thought about using
shib_user_form_user_register_form_alterspecifically instead ofshib_user_form_alter; the reason I haven't made that change is that I'm intending to further develop the module to add Shibboleth provision controls on user edit as well (per the@todoon line 37), which will require that the same alterations be made touser_profile_form. I decided it was better to implementhook_form_alteronce and check the form ID, but I'd be interested to know if it's a more accepted practice to implement the form-specific hooks (and call a shared function that implements the actual form changes, perhaps).Comment #6
klausiReview of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
manual review:
Otherwise I think this is ready for a single project promotion. Removing review bonus tag, if there are still changes required you can add it again if you have done another 3 reviews of other projects.
Comment #7
svenaas commentedThanks, Klaus. I had already run my code through the online PAReview.sh and cleaned up all the things it found before tagging this as "needs review." I just checked again and it doesn't report any problems, but I'll get these changes in.
The next revision of this project will have more than five functions (I'm not sure how long the code will need to be, though) when I've implemented the provision-on-edit and de-provision logic and the module configuration settings. Should I perhaps get that done now, if it will maybe give you enough code to assess my merits as a contributor?
Comment #8
svenaas commentedThe current revision (just tagged beta1) adds
Klaus, implementing these changes brought the module past 200 lines of code, with 11 functions.
Comment #8.0
svenaas commentedAdded a third project review link.
Comment #9
svenaas commentedI've updated the project page and reviewed three more project applications, so I'm adding the "PAReview: review bonus" tag once more. Provided that my changes don't raise any new concerns I'm hoping that this more mature module now represents a significant enough piece of functionality and code to establish contrib credibility.
Comment #9.0
svenaas commentedReviewed three more project applications.
Comment #10
klausimanual review:
Otherwise this looks nearly ready to me and I would say that this is enough code to approve you as git vetted user. As the permission problem is somewhat security related I'm bumping this back to "needs work".
Thanks for helping out with other project applications and for your patience! Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects. Also removing the single project promote tag.
Comment #11
svenaas commentedThanks, Klaus. The permission setting was a good catch -- I've switched it to use the shib_auth module's 'administer shibboleth authentication', since this module's configuration settings are dependent on shib_auth's configuration. I've also made the change to
shib_user_is_provisioned(), but I'm still storing the query results in variables because I'll need them in the future if I want to check for the inconsistent and unexpected case where one an account has somehow been provisioned in only one of the two necessary tables (I've left myself a @todo comment about that).This update resolves all the issues I'm aware of so I'm switching the status back from "needs work" to "needs review". I don't suppose I should put it back to "reviewed & tested by the community" myself, even if it was there before).
Comment #12
agentrickardI think this is RTBC if we can get input from the main Shibboleth Auth maintainer.
Comment #13
svenaas commentedThanks again, Ken. I did write to bajnokk on February 16 and asked him to weigh in when he can. He's otherwise busy at present but said he thought he'd be able to take a look in a few days.
Comment #14
agentrickardI think this process takes too long.
Comment #15
bajnokk commentedSorry for taking too long to respond. I'm too busy with other tasks, so I'm just starting to look deeper in this. Meanwhile, could someone please summarise the benefits of this being a separate module? Of course, it's possible that I will find it out myself in a couple of minutes...
Comment #16
svenaas commentedThanks for taking a look. My rationale for putting this in a separate module was that it's something useful to the subset of shib_auth sites which a) have a mixture of shib and non-shib users, b) need admins to be able to create shib_auth-provisioned accounts before a user logs in, and c) need to be able to view and alter shib_auth provisioning on existing accounts. I'm not sure how large a subset of shib_auth users this is but I'm not certain it constitutes a majority. At the very least I believe Shibboleth Users needs to be optional secondary functionality, and having it in a separate module makes this easy.
Another factor which made me lean toward a separate module was the fact that this shib_auth issue doesn't seem to have found traction with the shib_auth development community. If Shibboleth Users were, for example, made an optional sub-module of shib_auth it would raise the complexity and maintenance burden of shib_auth in an area where that simply may not be welcome.
What I propose is to release Shibboleth Users as a separate contrib module and see whether people find it useful. If they do, once it matures a little more as a result of user feedback perhaps we could consider rolling it into a future release of shib_auth itself.
Comment #17
bajnokk commentedFirst of all, this module is very cleanly written. I wish I could write such clean code. Secondly, it solves a real problem for some of the shib_auth users and I can say it's a rather elegant solution from the users point of view.
My biggest problem is that it overloads the semantics of the targeted_id column of the shib_authmap table. However, I've been thinking for a long time how it could be avoided without heavy modification of shib_auth, but couldn't find a simple solution. Adding one more database table seems to be overkill, but perhaps this is the only 'academic' way. Although I don't understand why the IdP field can't be filled out, but in this case, it may be even desirable, because it would help to select the entries which are in fact created by shib_users instead of shib_auth, if it would ever be of any significance.
I don't really fancy the name 'Shibboleth Users'. Perhaps 'Shibboleth Provisioning' could better describe the functionality, but I understand it's more typing and names are, well, just names.
It's important that some of the provisioning logic still remains in shib_auth, but I hope it will get clearer with future releases of both module.
The module needs some more extensive documentation, especially about what happens on changes (switching the module on/off, changing the unique identifier, enabling provisioning of a user) and its relation of shib_auth's account linking and custom mail/username features.
All in all, none of the critics above are serious enough to block a module creation, so I support it to be accepted. I'm looking forward to collaborating with Sven. It's possible that shib_auth will incorporate this functionality in the future (if this will be technically reasonable), but for the time being, it will solve a present problem of a handful of shib_auth users. So in the name of shib_auth: welcome!
Comment #18
tim.plunkettThanks for your contribution! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Comment #19
svenaas commentedThanks, bajnokk, for your thorough analysis, for your kind words and thoughtful comments, and for your support. I've learned a lot going through this process, and I've been gratified by the helpful response of the people here. I also look forward to collaborating and contributing more with this and other projects.
Names are just names, as you said, but they're hard to choose. My intended short name for the project has been "shib_user" (and that's what used in the code files) but I could imagine changing it to "shib_prov". Either way do you think I should change the descriptive name to "Shibboleth User Provisioning"? Does anyone want to weigh in on this before I promote this to a full project?
Maybe I should move discussion of your other points to a different venue, but since we're here: the challenge I have with pre-populating the IdP field is knowing what string the provider's going to send along. In the application I'm working on there's a consortium of five different institutions any one of whom could provide accepted identities. I was expecting that when that happens each institution's Shibboleth users would end up a different IdP string, but maybe that's not the case. So far I've only turned on shib_auth access for the home institution. Do you think it would be better for shib_user-provisioned accounts to have some other value in the IdP field?
I would appreciate more detail from you at some point about the intended semantics of shib_authmap.targeted_id — it doesn't sound like my use of this field is getting in the way of shib_auth yet, but I certainly want to avoid that in the future.
As for documentation, you are absolutely right. I was dragging my heels a bit while things were changing quickly in the code, but I'll make sure that's much more thorough before the module gets out of beta. I'm planning, by the way, to stay in beta until at least a few other people have tried it in their own environments, or failing that, at least until I've run it in production for for some months.
Comment #20
tim.plunkettComment #21
svenaas commentedThank you, Tim — I hadn't seen your post when I was wrote my #19 above.
Comment #22
shafter commentedAs an other shib_auth developer, I also think it would be great, if the name would suggest the action being made by this module, otherwise, welcome aboard!
Comment #23
bajnokk commentedAs for the name: yes, I think 'Shibboleth User Provisioning' would be more descriptive. We should probably move the targeted_id discussion into a feature request of your project.
Comment #24
svenaas commentedThank you all again. I've changed the title to "Shibboleth User Provisioning", assigned shib_provision as the short name, and promoted to this to a full project at http://drupal.org/project/shib_provision.
Comment #25
heatherwoz commentedVery pleased to see this module. This functionality was sorely needed.
Comment #26.0
(not verified) commentedDescription updated to accurately describe current revised version of project.