Core 6.x

Please note: if you are using automated testing tools like the coder module, the subdirectories "usr/..." and "provision/..." will generate warnings which are not applicable. These directories include dependencies for drush and aegir-provision which are outside of the scope of 'normal' drush modules OR largely outside of our control and included as examples only (as detailed in the readme).

We've completed initial testing with several Aegir platforms. The module store/edits/retrieves and deletes settings which are applied to Apache config fragments correctly. Consequently, sites deployed with Aegir profiles are secured with Basic Auth over LDAP.

Next round should require SSL. But this requires patching Aegir itself.

The sandbox project ist located at:

http://drupal.org/sandbox/blueprint/1331024

Since this was a fork of a more basic module, original development took place on github.

CommentFileSizeAuthor
#24 drupalcs-result.txt14.12 KBklausi

Comments

doitDave’s picture

Status: Needs review » Needs work

Hi and welcome to the queue,

only some brief hints, rather minor issues:

  • You are working on the master branch; you should work on a major branch instead. See http://drupal.org/node/1127732.
  • Although it can be found in the info file, you should add the major core branch to your summary.
  • Doxygen comments schould be added to all functions (except hooks). See http://drupal.org/node/1354
  • You should also add @file comments.

Besides "formal" review, your Readme says "module may not work". I am not really familiar with aegir stuff, so probably there is no problem. Just wanted to mention it.

blueprint’s picture

Thanks for the heads up. I'll review the branch. We're still moving back and forth incorrectly between git hub and this project repo. EDIT... I just realized there's not much left to document since it's all hooks :) I'll do some more inline documentation :)

For point two, I assume you mean in the description?

I'll update the function signatures asap.

The README note 'may not work' is from the fork. The module works in production (try it out at dcity-1.newthinking.net :)

blueprint’s picture

Issue summary: View changes

Added link to sandbox.

doitDave’s picture

Hi, the D6 info should be here on the review appliance page, in the summary.

As soon as you are ready for the second round, don't forget to switch the status to "needs review" again.

Personal note: As I have been struggling with the coding standards myself not many days ago, I really recommend taking one or two hours to read the documents I have linked. They are not completely consistent after all (some things are constantly evolving atm) but give a good overview about what is considered as good documentation here.

If you have further questions feel free to get in direct contact, und dann auch gerne auf deutsch ;)

blueprint’s picture

Status: Needs work » Needs review

We've reviewed the comments in the code. In the main, most of the module and provision code implements well documented interfaces (hooks) which do not need to be further elaborated. We will, however, in the course of time add some more inline code.

We are running the module as it is available here in 4 deployments of aegir 1.4. This encompasses 7 different platforms and 8 different profiles. So far so good.

For the sake of completeness (we hope) we've added some further notes about installation and added a some optional code (subset of the aegir provision drush commands as we modify them to support ssl without locking ip addresses).

The last, point, however, takes us far beyond the ken of non-system admins. We're a bit uncertain how to deal with this.

Otherwise, we've added the branch to the git repo (6.x-1.1). At the moment, we do not wish to remove master since we are also collaborating on git hub. We wil remove head (move to 6.x-1.1-dev) once all parties are informed.

chakrapani’s picture

Status: Needs review » Needs work

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:

  • Run coder to check your style, some issues were found (please check the Drupal coding standards):
    Severity minor, Drupal Commenting Standards, Internationalization, Drupal Security Checks, Drupal SQL Standards, Drupal Coding Standards
    
    sites/all/modules/pareview_temp/test_candidate/hosting_http_basic_auth_ldap.module:
     +5: [minor] Comment should be read "Implements hook_foo()."
     +39: [minor] Comment should be read "Implements hook_foo()."
     +48: [minor] Comment should be read "Implements hook_foo()."
     +61: [minor] Comment should be read "Implements hook_foo()."
     +68: [minor] Comment should be read "Implements hook_foo()."
     +75: [minor] Comment should be read "Implements hook_foo()."
     +106: [minor] indent secondary line of comment one space 
     +106: [minor] Comment should be read "Implements hook_foo()."
     +107: [minor] indent secondary line of comment one space 
    
    Status Messages:
     Coder found 1 projects, 1 files, 9 minor warnings, 0 warnings were flagged to be ignored
    
  • README.txt is missing, see the guidelines for in-project documentation.
  • @file doc block is missing in the module file, see http://drupal.org/node/1354#files .
  • @file doc block is missing in the install file, see http://drupal.org/node/1354#files .
  • ./hosting.feature.http_basic_auth_ldap.inc: comment lines should break at 80 characters, see http://drupal.org/node/1354#general
        // initial status ( HOSTING_FEATURE_DISABLED, HOSTING_FEATURE_ENABLED, HOSTING_FEATURE_REQUIRED )
    
  • ./provision/http_basic_auth_ldap.drush.inc: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function http_basic_auth_ldap_provision_services() {
    function http_basic_auth_ldap_provision_apache_vhost_config($uri, $data) {
    function http_basic_auth_ldap_provision_nginx_vhost_config($uri, $data) {
    
  • ./hosting.feature.http_basic_auth_ldap.inc: The description on the line after the @param/@return documentation is either missing or not formatted correctly. See http://drupal.org/node/1354#functions
    15- *  associative array indexed by feature key.
    
  • Classes and Interfaces should use UpperCamel naming. See http://drupal.org/node/608152
    ./provision/http_basic_auth_ldap.drush.inc:22:class provisionService_http_basic_auth_ldap extends provisionService {
    
  • All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting
    ./hosting_http_basic_auth_ldap.install ./hosting_http_basic_auth_ldap.drush.inc ./hosting.feature.http_basic_auth_ldap.inc ./usr/share/drush/commands/provision/http/apache_ssl/vhost_ssl_disabled.tpl.php ./usr/share/drush/commands/provision/http/apache_ssl/server_ssl.tpl.php ./provision/http_basic_auth_ldap.drush.inc ./hosting_http_basic_auth_ldap.module ./hosting_http_basic_auth_ldap.info
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

blueprint’s picture

The PAReview.sh script you've employed to generate your checks appears to be for drupal 7, not 6. I'll attempt to tease out what is indeed not compliant (camelCase for instance?) but don't understand some of the instructions.

For example:
Comment should be read "Implements hook_foo()."

Is neither grammatically correct nor would it yield correct code. It should, probably, 'read'

Comment should read "Implements hook_foo()".

But that's a bit tricky to discern. A bash script mixed with several modules tested against drupal 7 seems not to be the correct way to test our code.

blueprint’s picture

As for Branch, a 6 Branch is available and the prescence of master is commented upon in #4. You did not, however, comment on my questions in 4. ? master branch has been wiped as per instructions.

blueprint’s picture

function http_basic_auth_ldap_provision_services() {
function http_basic_auth_ldap_provision_apache_vhost_config($uri, $data) {
function http_basic_auth_ldap_provision_nginx_vhost_config($uri, $data) {

These cannot be renamed as suggested above as they Implement services that exist. They cannot clash with modules since they are not used directly but by the drush provision command.

In short, this is drush command code and not 'a module'.

blueprint’s picture

Status: Needs work » Needs review

The rest of the above suggestions, aside from the remarked in #8 have been implemented.

Since there is no release, I don't see how to guide suggested above can be followed (the git branching guide). In any case, the master branch is now 'empty'.

blueprint’s picture

The remark in #5 which reads:

./hosting.feature.http_basic_auth_ldap.inc: The description on the line after the @param/@return documentation is either missing or not formatted correctly. See http://drupal.org/node/1354#functions
15- * associative array indexed by feature key.

has been corrected to read

* @return array
* associative array indexed by feature key.
*/

Which is in accord with the documentation at http://drupal.org/node/1354#functions

blueprint’s picture

Issue summary: View changes

Responding to review.

patrickd’s picture

You are working on a false named branch in git! See the documentation about release naming conventions in git.

Review of the 6.x-1.1 branch:

  • Lines in README.txt should not exceed 80 characters, see the guidelines for in-project documentation.
  • ./provision/http_basic_auth_ldap.drush.inc: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function http_basic_auth_ldap_provision_services() {
    function http_basic_auth_ldap_provision_apache_vhost_config($uri, $data) {
    function http_basic_auth_ldap_provision_nginx_vhost_config($uri, $data) {
    
  • ./hosting.feature.http_basic_auth_ldap.inc: The description on the line after the @param/@return documentation is either missing or not formatted correctly. See http://drupal.org/node/1354#functions
    15- *  associative array indexed by feature key.
    
  • Remove all old CVS $Id tags, they are not needed anymore.
    usr/share/drush/commands/provision/http/http.ssl.inc:2:// $Id$
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

Source: http://ventral.org/pareview - PAReview.sh online service

patrickd’s picture

Status: Needs review » Needs work
blueprint’s picture

Status: Needs work » Needs review

Don't get it. We're working on the correct branch. The last commit read "Commit 76e10ba on 6.x-1.1"

aegir@aegir.newthinking.net [0] 21:49:16 /var/aegir/hostmaster-6.x-1.4/sites/aegir.newthinking.net/modules/hosting_http_basic_auth_ldap
$ git branch
* 6.x-1.1

You're running a script that doesn't even support 6.x directly and I'm gradually inclined to ask for mediation from someone else.

The naming issue I already commented on (that is it's not relevant and NEEDS to be as it is for drush). You really need to read the comments I make and stop relying on AUTOMATED TESTS.

The hosting.feature.http_basic_auth_ldap.inc line has already been corrected. AND I commented on it.

What gives?

The file in usr ist NOT maintained by us but provided as a courtesy. If you'd prefer (since your automated tests are too 'dumb' to see what is in play here) we'll simply remove the code and make it harder for people to use the module and drush provision script.

blueprint’s picture

As we are actively using this code on 5 Aegir instances with as many install profiles (Open Atrium, COD, and 3 of our own unreleased profiles + plus Managing News and Openscholar just for fun) we consider the code release ready and have created a release branch (which seems to be what people are on about). I believe the tag is fine but, since the instructions are somewhat ambiguous would ask for a review of that.

patrickd’s picture

Status: Needs review » Needs work

.. crap .. (this comment was, not the project)

blueprint’s picture

I read. I did not blame. The instructions claim you can use any branch names you want and there is not distinction about 'head' which is not relevant in git like it is in svn, for instance. The instructions EXPLICITLY state you can have any number of named branches. That can also clearly be seen in MANY projects.

I really don't understand what you're on about. Please quote the section more explicitly since your review, as in the script (run on from third party site by the look of it) doesn't help me otherwise.

blueprint’s picture

To quote the reference you keep sending:

While there are no naming restrictions for branch and tag names in Git itself, when you want to make your changes available for download by the community on Drupal.org, branch and tag names need to follow a convention.

The conventions are lousy enough as it is (as an engineer, I factor out the .x since it has no meaning) this statement is either misleading or false.

Either the git server in question support 'any' name for a branch/tag or not. As far as 'available' for download, as I understand it, A branch on the remote (dropal.org) which is named 6.x.1.x (or 7.x.2.x) is 'released' if it's tags are 'release' compatible. But other git branches are simply stored (and of course available to others to work with).

I MUST have another branch on remote than a release branch so what exactly is the CASE

patrickd’s picture

I'm sorry I misunderstood what your point was - I should read more carefully indeed :(

bfr’s picture

Status: Needs work » Needs review

The .x means that drupal.org will treat it as the latest dev version.
The branch 6.x-1.x will be packaged as 6.x-1.x-dev. The stable(or beta or whatever) releases will then be created with tags.

So, while your personal development branch, 6.x.2.x-dev, has a bit misleading name, your branching is technically correct. The 2.x just wont get recognized by the packaging script. It is, however, unclear to me why you wont name the 2.x correctly also? The dev branch is not considered as a recommended, working release, it's completely ok if it does not work, and it would make it easier for the other developers to chip in. You even get to choose if you want it packaged or not.

I spotted some minor coding standard issues, but apart from those, this look ready to me. I lack the expertise in this area, but personally i believe you don't.
It would be good, however, to get some insight also functionality-wise. Maybe you could draw attention to this case from IRC?

if ($node->type == 'site') {
    switch ($op) {
    case 'insert':
        hosting_http_basic_auth_ldap_insert($node);
        break;

Mis-indentation.

 $lines[] = "  <Directory \"$root\">";
    $lines[] = "    AuthType Basic";
    $lines[] = "    AuthName \"$message\"";
    $lines[] = "    AuthBasicProvider ldap";
    $lines[] = "    AuthLDAPURL \"$server\"";
    $lines[] = "    Require $require";
    $lines[] = "    AuthzLDAPAuthoritative on";
    $lines[] = "  </Directory>";

Generally arrays(when longer than 80 charcters) in drupal should be created this way(example from the coding standards doc):

  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => t('Title'),
    '#size' => 60,
    '#maxlength' => 128,
    '#description' => t('The title of your node.'),
  );
	function hosting_http_basic_auth_ldap_hosting_feature() {
	  $features['http_basic_auth_ldap'] = array(
	    // title to display in form
	    'title' => t('HTTP Basic Ldap Authentication'),
	    // description
	    'description' => t('Allows admins to specify HTTP basic ldap authentication for sites.'),
	    'status' => HOSTING_FEATURE_DISABLED,
	    // module to enable/disable alongside feature
	    'module' => 'hosting_http_basic_auth_ldap',
	    // which group to display in ( null , experimental )
	    'group' => 'experimental'
	    );
	  return $features;
	}

Also the last line of the array must end in comma(,).

bfr’s picture

bfr’s picture

Actually, since the issues are minor, let's keep this in "needs review" state hoping that someone will jump in with better in-depth review.
Please fix the coding standard things anyway.

If nobody comes, i say let's change it to RTBC(since the code looks ok and you yourself are already using it in production environment) and see what the "upper level" thinks.

klausi’s picture

Status: Needs review » Needs work
StatusFileSize
new14.12 KB

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

  • Remove all old CVS $Id tags, they are not needed anymore.
    usr/share/drush/commands/provision/http/http.ssl.inc:2:// $Id$
    
  • Drupal Code Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.

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:

  • hosting_http_basic_auth_ldap_nodeapi(): a break statement after a return statement is unreachable code, so remove it.
  • wrong git tag name, "6.x.1.1" should be "6.x-1.1". Regarding the branch 6.x.2.x-dev see comment from bfr.
  • "include_once('/usr/share/drush/commands/provision/provision.service.inc');": hard-coding this path is ugly. The installation instructions should mention that the user needs to change that path if they have drush in a different location.

Otherwise I think this is nearly ready. I know, getting feedback on your application took long, you can speed up the process with #1410826: [META] Review bonus if you don't want to wait another 4 weeks for a review.

blueprint’s picture

Thanks for the feedback.

As I'd previously remarked, i'd included some code with modifications from another project you found issued with in manual review. The only thing I can do here is remove the code which is intended to be an example of how to implement one's own apache config templates. This code, (in the usr/share... subdir) is not part of 'this' project. It is however, one of the few ways to make apache basic auth safe (SSL SNI support is missing in out of the box aegir+apache), which is why I included the code.

Since this is the second time someone has pointed out the same thing, I wonder it it's not stated explicitly enough in the read me. ?

prashantgoel’s picture

please see http://ventral.org/pareview/httpgitdrupalorgsandboxblueprint1331024git for the errors still being generated

blueprint’s picture

Status: Needs work » Needs review

Comments above already deal with:

usr/share/drush/commands/provision/http/http.ssl.inc:2:// $Id$

usr/share/drush/commands/provision/http/apache_ssl/server_ssl.tpl.php:

usr/share/drush/commands/provision/http/apache_ssl/vhost_ssl.tpl.php:

usr/share/drush/commands/provision/http/apache_ssl/vhost_ssl_disabled.tpl.php

usr/share/drush/commands/provision/http/http.ssl.inc

And the rest of the automated report is rubish since it doesn't consider that 'example code' is included to ease the use of the module in a secure way.

I've said it before, but I either make it MUCH harder to use the module by not including code with I don't maintain but modify to make it possible to use this module (with SNI ssl configurations /https) ... or I include code which I don't control the formatting to.

It would really help if people who submit reports would learn to read.

avpaderno’s picture

Priority: Normal » Critical
klausi’s picture

Priority: Critical » Normal
Status: Needs review » Reviewed & tested by the community

Sorry for the delay, but you have not listed any reviews of other project applications in your issue summary as strongly recommended in the application documentation.

There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732

manual review:

  1. The wrong tag "6.x.1.1" still exists, please remove it.
  2. Most of the automated coding standard errors still exist for your module file and others, but I consider them minor.

Otherwise this looks RTBC.

patrickd’s picture

Status: Reviewed & tested by the community » Fixed

Note that comments should begin capital and end with . ! or ?
Also you indentation is quite unstructured (eg. in the switch() in hook_nodeapi)
The $ID$ stuff is also not needed any longer, remove it.

Thanks for your contribution!

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

Added Additional info for people testing with tools like coder.