Penn Engineering CETS Answers

How to use PennKey accounts for authentication

This form of authentication supports PennKey account credentials and works on the following domains:

  • https://www.seas.upenn.edu
  • https://www.cis.upenn.edu
  • https://www.webdav.seas.upenn.edu
  • https://fling.seas.upenn.edu
  • https://alliance.seas.upenn.edu

Note that it must be accessed via https://. Trying to access protected directories over http:// will return an error.


Create your .htaccess file

  1. Create a new file called ".htaccess" using your favorite text editor.
  2. The file should contain something similar to this:

    AuthType Kerberos
    AuthName "PennKey Login"
    Require user clifford@UPENN.EDU marilyn@UPENN.EDU

    Replace "clifford" and "marilyn" with the PennKeys of the people who should have access. Each item should be separated by a space.
  3. Save the file and upload it to the directory you want to protect using your favorite FTP client (more info).

Note: If you are comfortable using vi or emacs on the command line, it may be easier to create the file directly on the server.


Setting the directory permissions

Note: it is not advisable to use the chgrp-httpd script if you are protecting files in your CGI directory. Instead, chmod the protected directory to 700.

This final step is important to make make sure people with local accounts can't access your files via the unix file system. Set the correct permissions on your protected folder by running the following command from within the directory you want to protect:

chgrp-httpd .


Other options

To let anyone with a valid PennKey account access the directory, use this:

AuthType Kerberos
AuthName "PennKey Login"
Require valid-user

Note: PennKeys are intended for authentication, not authorization, and are not restricted to any well defined group of people. They can be thought of as including everyone affiliated with Penn, plus people who were recently affiliated with Penn. "Affiliated" may include alums, spouses and children of faculty/staff, colleagues of Penn faculty, contractors and consultants, people who attended events on Penn campus, etc.

For more options of things to do with your htaccess file, please visit Apache's site.

© Computing and Educational Technology Services cets@seas.upenn.edu 215.898.4707