Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
HTTP Basic Authentication against vB-Accounts Details »»
HTTP Basic Authentication against vB-Accounts
Version: 1.00, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 02-12-2004 Last Update: Never Installs: 14
Is in Beta Stage  
No support by the author.

Seeing all those "user integration" requests over and over again I made a small "hack" (not really as no tables, templates or files are modified ) that might be useful if you want to give access to non-forum content based on forum accounts:

HTTP Basic Authentication against vB user table
------------------------------------------------

This "hack" allows you to use HTTP Basic authentication
(password protected directories) based upon vB accounts.

Update Version 0.2
------------------
I've added a configuration option to the .htaccess so
you can specify which usergroup (only one for the moment)
you want to grant access.
If you don't need this feature just leave the line commented out.

Requirements
------------
- vBulletin 3 (at least the user table)
- Apache/mod_perl compiled with support for PerlAuthenHandler
- Basic Authentication feature enabled to be used in .htaccess

Installation
------------
1) Edit vBAuth.pm, fill in the configuration settings (database, etc.)
2) Put vBAuth.pm in your Perl Apache-Moduls directoy
3) (Optional) Edit .htaccess to meet your requirements
4) Put .htaccess in the directory you want to protect

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-14-2004, 12:47 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, root access is required.

> Using whereis apache it shows the /usr/local/apache
That's apache itself

Try
Code:
find / -name Apache
Does that give you any direcory within the perl root? If so put it there.
If not create a directory called Apache within the perl includes search path and put it there.

> I've tried both but I got internal error, hmn...
What's in error.log?
Reply With Quote
  #13  
Old 02-14-2004, 07:37 PM
Nam's Avatar
Nam Nam is offline
 
Join Date: Oct 2001
Location: NY
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see the Apache dir in /usr/lib/perl5/site_perl/5.8.1/Apache then I use wget www.mysite.com/vBAuth.pm.

But then when I uploaded the .htaccess to the folder I want to protect, I got an error:

Quote:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@mysite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
my apache version is 1.3.29 and I did change database configuration in vBAuth.pm.
Reply With Quote
  #14  
Old 02-14-2004, 07:52 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So once again:
What error-messages do appear in error.log (don't know the path on your system - might be /var/log/httpd/error.log or smth. like that)?
Reply With Quote
  #15  
Old 02-14-2004, 08:16 PM
Nam's Avatar
Nam Nam is offline
 
Join Date: Oct 2001
Location: NY
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The reason I didn't post error.log because I didn know where is that file , and now knowing and seeing the location /var/log/httpd but it's empty in that folder. Should I give up? It's such a great hack for many features in my board.
Reply With Quote
  #16  
Old 02-14-2004, 08:46 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm ... must be somewhere

The location of the error logs is defined in httpd.conf, but where your httpd.conf resides ... don't know, maybe /etc/apache/httpd.conf

If not try
find / -name httpd.conf
to lookup where httpd.conf is

Or directly search for error.log
find / -name error.log
Reply With Quote
  #17  
Old 02-17-2004, 12:53 AM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK...if I am running Apache locally, where does this need to go to work?
Reply With Quote
  #18  
Old 02-17-2004, 01:23 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You must put vBAuth.pm in your Perl Apache-Modules directory.
Reply With Quote
  #19  
Old 02-17-2004, 10:44 AM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh, I'll have to look into that more, not sure that even exists yet.
Reply With Quote
  #20  
Old 02-19-2004, 02:25 AM
dontpanic dontpanic is offline
 
Join Date: Jun 2003
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

KirbyDE, do you have any suggestions or ideas on alternative ways to achieve basic authentication against the vB user table. I don't think the module way is going to work out for us...but it is a cool hack none the less.
Reply With Quote
  #21  
Old 03-06-2004, 03:31 PM
Chrissicom's Avatar
Chrissicom Chrissicom is offline
 
Join Date: Mar 2004
Location: Austria / Germany
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there any way to make this hack IIS compatible, or is there a similar IIS compatible hack?? .htaccess is useless on IIS.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:20 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04589 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete