[pmwiki-users] DBauth question

Ben Wilson dausha at gmail.com
Tue Jun 27 16:25:23 CDT 2006


On 6/27/06, Jason Frisvold <xenophage0 at gmail.com> wrote:
> On 6/27/06, Marc Cooper <gmane at auxbuss.com> wrote:
> > The plan is to replace dbauth with authuser_dbase. I was working on this
> > with the author, Ben, but he is in the middle of some academic work, and
> > I've not heard from him in a while. That said, dbauth does the same
> > thing, the new version has a few tweaks that, for example, allow you to
> > put the variables in your config.php rather than having to edit the
> > recipe.
>
> Cool!  :)  I'm looking forward to this.  DBAuth at the moment seems
> more of a hack than a recipe..  No offense meant.  :)  I had to hack
> it up a bit to make it work the way I wanted.

Oh, it's a hack. Being the author, I fully admit it. I was tapping
into the PunBB user table and allowing a web site's forum handle the
user authentication. This does not do well for groups.

> Any chance you're looking into groups as well?

My plan is to build a three-table authentication: user, group,
user_group. The three tables should be self-describing. This will
require a little more code, but the objective is to be as closely
compatible with PmWiki, naturally. Need the third table for the
many-to-many between user and group.

I also am building in both Postgress and mySQL support.

> It's worth noting that you can pretty much use any table definition
> for this.  I have a pre-existing database used for authentication for
> a large intranet system.  Just modifying the SQL select statement was
> enough to make this work.

Yep. The goal is to keep it flexible, while also providing a complete
solution. That way, you can use my "hack" approach (i.e., let another
software package do it), or you can fly solo. I was tempted to add
BerkleyDB support--with a blank database, but there's no reliable
built in support for Berkley in PHP.[1]

> > I'd also comment out the $AuthForm lines in dbauth.php, since this
> > overrides Site.AuthForm and it's easier to manage this within PmWiki,
> > imo.
>
> Hrm..  easier to manage how?  Just comment out the $AuthForm?

I believe this is removed in my more recent/broken version. I'm
supposed to be working with Marc on this, but I'm swamped until July
3d. I'm giving a presentation to a jurisprudential class on the
Original Meaning of the Treason Clause of the U.S. Constitution. The
rough draft for the paper is due the same day.[2] I may not have a lot
of time until July 28th, when I believe I'll be able to enjoy another
"summer of code."

> If you do go this route, though, use good table design.  Don't litter
> the user auth tables with useless junk that is better suited to it's
> own table...

I'm notorious for building lean designs. I had a DBA get on to me for
a fourth level normalization (or was it third). She "preferred" a
second level and the rest of it be handled by the code. My philosophy
is leave the database stuff in the database.

> > > And lastly, are there some
> > > wiki-based admin interface for editing the database, or would it all
> > > have to be manually edited?

Hmm. Are you talking user management or . . .

-- 
Ben Wilson
"Democracy: two wolves and a sheep voting on what's for dinner."

[1]: I'm taking on a professor who published last Winter by saying
that it's easy to be prosecuted for treason and that only the First
Amendment can save you. My counter is that it's easier to be
accidently convicted of murder in the first degree, and that the first
word in the First Amendment destroys the rest of the professor's
argument. It goes "Congress . . ." The Treason Clause is not governed
by Congress as it is embedded in the Constitution.

[2]: BerkleyDB can be added on, and that requires root access to
compile. Since most of us are web hosting, we can't do that route.
Otherwise, Berkley would be a great choice. I think there's PHP5
support built-in, but I cannot confirm that right now.




More information about the pmwiki-users mailing list