Closed Bug 438435 Opened 16 years ago Closed 16 years ago

Need code hooks for authentication

Categories

(Bugzilla :: User Accounts, enhancement)

3.1.4
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.4

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file, 1 obsolete file)

We need some way for plugins to add new Auth modules. There are two kinds of auth modules needed:

1. Special authentication methods used only by the plugin
2. New authentication methods for Bugzilla in general.

I have a way of accomplishing both of these that's easier to write in code than it is to explain.
Summary: Need code hooks for plugin-specific authentication → Need code hooks for authentication
Attached patch Work In Progress (obsolete) — Splinter Review
This is a work-in-progress. Due to the ridiculous architecture of parameters, this still requires a bit more work--*both* editparams.cgi and SetParam call the parameter's 'checker' subroutine...
I've already done a param hook - bug 430909, which has been checked in. Looks like your patch is off an older base?
(In reply to comment #2)
> I've already done a param hook - bug 430909, which has been checked in. Looks
> like your patch is off an older base?

  No, included in this patch is the renaming of your hook.
Attached patch v1Splinter Review
Okay, here we go! Whoever gets to this first is fine with me.

You'll see that I changed check_user_verify_class--check_multi was already doing that job for us, we didn't need additional checks to see if the specified types were valid.
Attachment #324559 - Attachment is obsolete: true
Attachment #324713 - Flags: review?(ghendricks)
Attachment #324713 - Flags: review?(bbaetz)
Attachment #324713 - Flags: review?(LpSolit)
Comment on attachment 324713 [details] [diff] [review]
v1

Is there any way we can extend the user object? Testopia currently has to patch to add a method. I don't see any way here to do that yet, but maybe that is a separate bug?
Why is this bug targetted 3.2 now that we branched?
(In reply to comment #5)
> (From update of attachment 324713 [details] [diff] [review])
> Is there any way we can extend the user object? Testopia currently has to patch
> to add a method. I don't see any way here to do that yet, but maybe that is a
> separate bug?

  That would require a whole different hook system, planned for the future.
(In reply to comment #6)
> Why is this bug targetted 3.2 now that we branched?

  Hooks can go into stable branches. Granted, this one *is* a little invasive. If you don't want it for 3.2 that's fine.
Comment on attachment 324713 [details] [diff] [review]
v1

I think I need to agree with LpSolit and retarget this. It needs to be tested. 

From the Hook perspective this looks good. I am not as cozy with the authentication code to make a judgment on that part of it, so I will defer to someone with more experience.
Attachment #324713 - Flags: review?(ghendricks)
Yeah, retargeting sounds like a good idea.
Target Milestone: Bugzilla 3.2 → Bugzilla 4.0
Comment on attachment 324713 [details] [diff] [review]
v1

>Index: Bugzilla/Auth/Verify/Stack.pm

>+    foreach my $login_method (keys %methods) {
>+        my $module = $methods{$login_method};

Nit: the variable name should be $verify_method, not $login_method.

Otherwise looks good to me. r=LpSolit
Attachment #324713 - Flags: review?(bbaetz)
Attachment #324713 - Flags: review?(LpSolit)
Attachment #324713 - Flags: review+
Flags: approval+
Checking in editparams.cgi;
/cvsroot/mozilla/webtools/bugzilla/editparams.cgi,v  <--  editparams.cgi
new revision: 1.49; previous revision: 1.48
done
Checking in Bugzilla/Config.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config.pm,v  <--  Config.pm
new revision: 1.75; previous revision: 1.74
done
Checking in Bugzilla/Hook.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Hook.pm,v  <--  Hook.pm
new revision: 1.17; previous revision: 1.16
done
Checking in Bugzilla/Auth/Login/Stack.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Auth/Login/Stack.pm,v  <--  Stack.pm
new revision: 1.2; previous revision: 1.1
done
Checking in Bugzilla/Auth/Verify/Stack.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Auth/Verify/Stack.pm,v  <--  Stack.pm
new revision: 1.2; previous revision: 1.1
done
Checking in Bugzilla/Config/Common.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Config/Common.pm,v  <--  Common.pm
new revision: 1.22; previous revision: 1.21
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/code/auth-login_methods.pl,v
done
Checking in extensions/example/code/auth-login_methods.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/auth-login_methods.pl,v  <--  auth-login_methods.pl
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/code/auth-verify_methods.pl,v
done
Checking in extensions/example/code/auth-verify_methods.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/auth-verify_methods.pl,v  <--  auth-verify_methods.pl
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/code/config-add_panels.pl,v
done
Checking in extensions/example/code/config-add_panels.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/config-add_panels.pl,v  <--  config-add_panels.pl
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/code/config-modify_panels.pl,v
done
Checking in extensions/example/code/config-modify_panels.pl;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/code/config-modify_panels.pl,v  <--  config-modify_panels.pl
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/lib/AuthLogin.pm,v
done
Checking in extensions/example/lib/AuthLogin.pm;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/lib/AuthLogin.pm,v  <--  AuthLogin.pm
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/webtools/bugzilla/extensions/example/lib/AuthVerify.pm,v
done
Checking in extensions/example/lib/AuthVerify.pm;
/cvsroot/mozilla/webtools/bugzilla/extensions/example/lib/AuthVerify.pm,v  <--  AuthVerify.pm
initial revision: 1.1
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: Bugzilla 4.0 → Bugzilla 3.4
Blocks: 488467
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: