Matej Vela | 3 Feb 2008 00:57
Picon
Favicon

LdapAuthentication: LDAP over IPC

Hi,

Here's a small patch to support LDAP over IPC, "ldapi://".  It's only
defined in an expired Internet Draft [1], but works quite well with
OpenLDAP.

--- LdapAuthentication.php~
+++ LdapAuthentication.php
 <at>  <at>  -159,6 +159,10  <at>  <at> 
 				$this->printDebug( "Using SSL", SENSITIVE );
 				$serverpre = "ldaps://";
 				break;
+			case "ipc":
+				$this->printDebug( "Using IPC", SENSITIVE );
+				$serverpre = "ldapi://";
+				break;
 			default:
 				$this->printDebug( "Using TLS or not using encryption.", SENSITIVE );
 				$serverpre = "ldap://";

[1] http://opends.dev.java.net/public/standards/draft-chu-ldap-ldapi.txt

Thanks!

Matej
Brian A. Seklecki | 5 Feb 2008 23:05
Favicon

Usage Reporting Package?

All:

Has anyone implemented any usage reporting systems?  Daily/weekly/
monthly periodic analysis?

- Something to track daily page creations / changes counts. 
- List new users
- Maybe also fetch and deliver excerpts from housekeeping special:pages
  like:
   Special:Recentchanges
   Special:Newpages
   Special:Lonelypages  - Pages with no link to them, orpaned
   Special:Deadendpages - Pages that have no external links
   Special:Uncategorizedpages - Pages lacking a category
   Special:Wantedpages
   Special:BrokenRedirects
   Special:Wantedcategories 
   Dead End Pages ...

A lot of this could be gleaned from the xml.php API system -- a small PHP script using xml_*() 
functions could parse it out into human readable pages.  

Thoughts?

Thanks,

--

-- 
Brian A. Seklecki <bseklecki@...>
Collaborative Fusion, Inc.

(Continue reading)

Lane, Ryan | 7 Feb 2008 16:30
Picon

Re: LdapAuthentication: LDAP over IPC

Matej,

Wow, that looks terrifyingly evil. But I guess if you are only using
LDAP as a user store for your web server, it wouldn't be so bad. I'll
add this into the next version.

Note that the next version may not be out for quite a while; another
extension I've been working on has slightly higher priority right now.

V/r,

Ryan Lane 

> -----Original Message-----
> From: mediawiki-enterprise-bounces@... 
> [mailto:mediawiki-enterprise-bounces@...] On 
> Behalf Of Matej Vela
> Sent: Saturday, February 02, 2008 5:57 PM
> To: mediawiki-enterprise@...
> Subject: [Mediawiki-enterprise] LdapAuthentication: LDAP over IPC
> 
> Hi,
> 
> Here's a small patch to support LDAP over IPC, "ldapi://".  It's only
> defined in an expired Internet Draft [1], but works quite well with
> OpenLDAP.
> 
> --- LdapAuthentication.php~
> +++ LdapAuthentication.php
>  <at>  <at>  -159,6 +159,10  <at>  <at> 
(Continue reading)

Brian A. Seklecki | 9 Feb 2008 02:44
Favicon

Re: Usage Reporting Package?

[Intentional Top Post]

Here is example output from the code I've hacked together.  

For some stats, I was able to use the XML API.php + SimpleXML:

  $General_Stats_Suffix="api.php?format=xml&action=query&meta=siteinfo&siprop=statistics";
  $today_pagecount=$doc->query->statistics['pages'];

For other things, I had to form custom queries and count() output array
sizes:

  $Count_Categories_Suffix="api.php?format=xml&action=query&list=allpages&apnamespace=14";
  $Count_Template_Suffix="api.php?format=xml&action=query&list=allpages&apnamespace=10";
  $today_categorycount=count($doc->query->allpages->p);

Some housekeeping pages provide nice simple RSS/ATOM XML feeds you can
parse (New Pages, Recent Changes):

  $doc = simplexml_load_file("$WIKIPrefixURI" . 
  "index.php/Special:Newpages?feed=rss&limit=20");

For other housekeeping pages that don't provide this, you have to scrape
HTML data structures using stupidity like:

  $doc = simplexml_load_file($WIKI .
  'index.php?title=Special:Wantedpages&limit=500&offset=0');
  foreach ($doc->body->div->div->div->div->div[2]->ol->li as $listItem) {
            print "   o " . $listItem->a . "\n";
   }
(Continue reading)


Gmane