NetBadge is the ubiquitous authorization tool here at UVa, and it authenticates every user providing access to hundreds of resources On-Grounds. Adding UVa credentials to your website is a great way to qualify the input on your site. Everything from adding comments on a site to providing special features or content may be of help as you develop a new site. An added bonus? One less password and login to learn!
NB: Before you being, remember that ITC must create a NetBadge identity on your server. Talk to your department’s ITC liaison to make this happen.
Drupal has numerous authentication options, one of them is known as pubcookie. This is technically the name of NetBadge (Why does ITC call it NetBadge? Who knows, who cares… maybe it makes them feel special. Whatever. Its real name is pubcookie, so from here on that’s what we’ll call it.)
- So you’ve installed Drupal and you now need to download Pubcookie
- Be a good Drupal developer and upload the contents of Pubcookie into yoursite.com/sites/all/modules/pubcookie
- Turn the pubcookie module on /yoursite.com/admin/build/modules
- Go to yoursite.com/admin/settings/pubcookie and
- Set “Domain = virginia.edu”
- Set “Login Directory = login”
- Set “Successful login URL: YourWebSite.com”
- and lastly “select ID/E-mail equivalency”
- Now you (or your ITC buddy) needs to add the following lines into the .conf file that controls your webserver. At the end of your main <VirtualHost *:80> add RedirectMatch ^/(login.*)$ https://intranet.hsl.virginia.edu/$1and under your <VirtualHost *:443> (the area for comfy secureness) add<Location /login>
PubcookieAppId somenamehere *use your own department or something…
- Restart your webserver (service httpd restart) and you’ve got pubcookie authentication on your site.
- Create a menu link that goes to http://yoursite.virginia.edu/login/pc?destination and label it to your liking.
Users with UVa credentials are now able to log in to your site automagicallly and a Drupal user is created with default authenticated permissions. You may alternately set them to join a specific role, have different landing pages etc.
For clarity’s sake here’s a sample httpd.conf file from our server and a screen shot of the settings.
Header unset Etag
/*we unset the Etag for efficiency in Drupal, you’re welcome to ignore this learn more from Dries himself here http://buytaert.net/yslow */
RedirectMatch ^/(login.*)$ https://yoursite.virginia.edu/$1
RedirectMatch ^/(secure.*)$ https://yoursite.virginia.edu/$1