This D7 module provides user authentication via Windows Azure's federated authentication system. More information on implementation can be found here: http://msdn.microsoft.com/en-us/library/windowsazure/gg429786.aspx

To create a Windows Azure account for testing, you can create a 90 day free trial at https://www.windowsazure.com/en-us/pricing/free-trial/

Administrative options exist for altering the user login form and/or providing a dedicated block that allows users to register and log in to your Drupal site using using either Google or Windows Live ID, the two identity providers currently supported. Instructions are present in the README and on the project sandbox site: http://drupal.org/sandbox/r2integrated/1842766

The module also provides an API for defining your own identity providers.

Thanks for your time reviewing!

Patrick

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/r2integrated/1842766.git azure_auth

Review Bonus
First bonus:

Second Bonus:

Comments

sirup’s picture

very well written code!

I reviewed the code manually and can find only one small issue: Please add a "configure" line to your info file that links to your configuration form you registered within the menu hook.

Automatic review: http://ventral.org/pareview/httpgitdrupalorgsandboxr2integrated1842766git

- the naming error is a false positive
- the other potential problem within the azure_auth.pages.inc is not solvable using form api because it gets called from the outside, right?

r2integrated’s picture

Thanks sirup! I have added the configure line now.

You are correct - the $_POST variable usage that PAReview complains about is by design - Windows Azure will forward users to that callback and the callback needs to examine the POSTed values to confirm authentication. The only data being stored in the database from the POSTed token is the nameidentifier claim which ends up in the authmap table, and the username and email address which are sanitized and validated by the user registration form validate callbacks anyway.

r2integrated’s picture

Issue summary: View changes

Added review bonus

paravibe’s picture

Hello,

Here is my manual review:
azure_auth.module: line 256, use db_select() instead of db_query().
Also please fix issues that automatic test found http://ventral.org/pareview/httpgitdrupalorgsandboxr2integrated1842766git
Other files are good written.

sirup’s picture

Status: Needs review » Needs work

@drupalrv As mentioned above most ventral issues are false positives, only the last one is correct.

@r2integrated Please use db_select() and fix the last formatting issue raised by the ventral.org mechanism.

r2integrated’s picture

Status: Needs work » Needs review

@sirup and @drupalrv

I have fixed the newline issue in azure_auth.info and have switched to db_select in azure_auth.module. Fixes are committed to 7.x-1.x. Thanks for the reviews!

r2integrated’s picture

Issue summary: View changes

Adding another review bonus.

r2integrated’s picture

Issue tags: +PAreview: review bonus

Applying for PAReview bonus.

r2integrated’s picture

Issue summary: View changes

Adding review

klausi’s picture

Status: Needs review » Needs work

manual review:

  1. azure_auth.api.inc should be named azure_auth.api.php
  2. azure_auth_uninstall(): this is a hook and should be documented as such, see http://drupal.org/node/1354#hookimpl
  3. azure_auth_user_insert(): check_plain() is not necessary here as you are not printing anything to the user? "When handling data, the golden rule is to store exactly what the user typed. When a user edits a post they created earlier, the form should contain the same things as it did when they first submitted it. This means that conversions are performed when content is output, not when saved to the database" see http://drupal.org/node/28984
  4. azure_auth_block_view(): no need to use module_load_include as you are including files from your own module which you already know where they are. Use something like require_once 'mymodule.inc';
  5. "t(variable_get('azure_auth_link_text', 'Sign in using Windows Azure')": t() should be used around string literals where possible, not around user provided data.
  6. "interface IAzureAuthenticationToken": interfaces should not be prefixed with "I" but postfixed with "Interface", see http://drupal.org/node/608152

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

klausi’s picture

Issue tags: -PAreview: review bonus

now actually removing tag ;-)

r2integrated’s picture

Status: Needs work » Needs review

Thanks @klausi for your manual review! I have implemented your fixes.

r2integrated’s picture

Issue summary: View changes

Beginning second review bonus.

r2integrated’s picture

Issue summary: View changes

Adding review

r2integrated’s picture

Issue summary: View changes

Adding review

r2integrated’s picture

Issue tags: +PAreview: review bonus

Applying for second PAReview bonus.

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Review of the 7.x-1.x branch:

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/azure_auth.pages.inc
    --------------------------------------------------------------------------------
    FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
    --------------------------------------------------------------------------------
     24 | ERROR | Invalid @param data type, expected bool but found boolean
    --------------------------------------------------------------------------------
    

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. You have to get a review bonus to get a review from me.

manual review:

  • "'#title' => t(variable_get('azure_auth_link_text', 'Sign in using Windows Azure')),": another instance where t() should be used directly on the literal string.

But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, r2integrated!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

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.

Thanks to the dedicated reviewer(s) as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Second bonus