CampusID: A Developers Guide

Summary: CampusID is a unique persistent number that corresponds to a user and is returned by WebAuth. It can be stored in application databases as a key to data about a person or account. It is also the lookup key that should be used to retrieve information about a person in LDAP or correlate information about a person between different systems.

CampusID

Definition: A persistent, unique, 12-digit integer used to identify an individual person.

Why use CampusID?

The identifier on campus that everyone is familiar with, UCInetID, is not sufficient to identify a person over time. In order to solve this issue, the CampusID was developed.

While useful as a mnemonic device for identification, over time a UCInetID’s value degrades. Let’s suppose that the UCInetID ‘peterant’ is entered into a database that is used to allow access to certain systems. This authorization system works fine until the user ‘peterant’ leaves the University. At this point, OIT may reassign ‘peterant’. Consequently, a new user would have access to the same systems authorized for original ‘peterant’.

CampusID solves this problem. The new user of ‘peterant’ would have a different CampusID than the previous ‘peterant’, because CampusIDs are unique, and stay with the same person forever: they are never reassigned. If the database in the example used CampusID rather than UCInetID, there would be no confusion between the original ‘peterant’ and the new ‘peterant’.

In this example, a UCInetID was reassigned. However, there are other ways for UCInetIDs to change. These include people returning to the University, requesting a UCInetID change, etc.

CampusID Policy

  • CampusID is a unique 12 digit integer with leading 0s.
  • CampusIDs will never be reassigned and will always stay with a person, even if they have left UCI and returned.
  • UCInetIDs will only map to one CampusID at a given time.
  • CampusIDs are available through UCI’s campus-wide LDAP directory. In addition, CampusID is an attribute returned by WebAuth.

How to use CampusID

CampusID can be retrieved from WebAuth or the campus-wide LDAP directory.

To retrieve a CampusID from WebAuth, simply run webauth_check on the user’s cookie and parse the campus_id name value pair. See the WebAuth help documentation for more details on using WebAuth.

To use LDAP to retrieve a CampusID, use an LDAP lookup with a search filter of the ucinetid — typically uid=XXXX. The whole LDAP record for the user will be returned including the CampusID. It is also possible to specify that CampusID be returned alone without any other attributes. The current LDAP hostname is ldap.service.uci.edu.

The LDAP database can also be used to gather information about a given CampusID. This is useful when wanting to know a user’s name, department, phone number, etc. The search filter used is campusid=XXXX. This will retrieve all the LDAP information for the given CampusID.

Please remember that while CampusId is case insensitive in LDAP, a client library might not be. This is the case in PHP where every LDAP attribute is returned in a hash in lower case.

LDAP Query Code Examples