Method for and apparatus for retrieving username and password in an authentication protocol

Disclosed is a computer implemented method and apparatus to retrieve authentication records required for user validation and creation of authentication credentials from an authentication server to be passed to the user. The method is comprised of the authentication server storing a first authentication record, then generating a first authentication credential based on the first authentication record. The authentication server associates the first authentication record with a first credential expiration time. The authentication server stores a second authentication record. The authentication server generates a second authentication credential based on the second authentication record, wherein the second authentication credential is associated with a second credential expiration time. Next, the authentication server associates the second authentication credential with a second credential expiration time. The authentication server determines that the first credential expiration time is earlier than the second credential expiration time and caches the first authentication record to cache.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to a computer implemented method, data processing system, and computer program product for caching data. More specifically, the present invention relates to using a credential expiration time to sort an authentication credential among a group of authentication credentials for placement into a cache or non-volatile storage.

2. Description of the Related Art

Authentication is used to verify a user when communications pass through media that is uncontrolled by a user or a server. Authentication is a critical feature of organizations that must coordinate the operations of distant people, but require communication through potentially hostile territory and/or media. In recent times, authentication is used principally in banking, commerce, and personal matters, particularly over the Internet and other networks that do not natively support secure communications.

With the creation of websites that offer services to many people, it has become popular to delegate or otherwise subcontract the authentication function to central servers that can support many networked services, commonly called authentication servers. Accordingly, modem authentication servers may be required to authenticate or re-authenticate users in a scalable manner. One form of an authentication server is a server based on the Kerberos authentication protocol. An authentication server in the Kerberos authentication scheme is called a Kerberos server. The Kerberos authentication protocol is further described in Internet Engineering Task Force Request For Comments (RFC) 1510 and predecessor documents, which are hereby incorporated by reference. A user who wants to begin an authenticated session must first obtain an authentication credential from the authentication server. Accordingly, the user, through the operation of a client, issues a request for authentication with an authentication server. The Kerberos server issues an authentication credential to a user when the user, or the client used by the server, is verified as authentic.

An authentication credential is a record associated with a user name that includes a credential expiration time. The credential expiration time may be a time expressed as universal coordinated time. The credential expiration time may be a time offset from a universally accepted starting time, including, for example, an epoch, a religious event, a celestial event, or any other time treated as a start time by convention.

When the authentication credential is older than the time indicated by the credential expiration time, the authentication credential is expired. A user may renew the authentication credential by making a follow-up request to the authentication query. The expiration of an authentication credential may be set based on policies of the authentication server. Thus, one user may receive authentication credentials having credential expiration time set to expire a duration after the initial request. However, a second user may receive authentication credentials set to expire a shorter duration after the initial request as compared to the first user.

To boost performance, conventional authentication servers may cache authentication records. In such an authentication server, the processor does not cache authentication data depending upon the activeness or expiration of credentials. The data processing system simply caches the most recently accessed data, irrespective of expiration of a credential expiration time. The authentication systems such as Kerberos authentication servers allows each user to be assigned different credential expiration durations, in effect, allowing for customizing credential expiration depending on the user.

The authentication servers described above attempt to reduce cache misses by applying a least recently used principle to the cache. Accordingly, fewer cache misses occur in such authentication servers, as compared to authentication servers that do not use the LRU principle. Nevertheless, as the workload is increased in an authentication server, the number of authentication records that correspond to unexpired authentication credentials may be so large that the authentication records may not fit within the allocated cache.

When a cache miss occurs, the authentication server relies on non-volatile storage of the authentication server. A cache miss is a performance reduction that occurs when data predicted to be in cache, is actually stored in a block device. The block device typically retrieves data at rates that are orders of magnitude slower than accessing data in cache. Accordingly, such cache misses are to be avoided. The prior art authentication stored authentication credentials to non-volatile storage on the basis of the duration of the authentication credential, as expressed as the time between the beginning of a validity period and the credential expiration time. In practice, this configuration may be sub-optimal.

“Storing” is a generic term that describes placing data into a device that may maintain the data persistently, even absent power, as well as placing data into a device that is volatile, and thus requires power to store charge and other physical indicia of the data. “Caching” refers more specifically to the execution of moving and/or copying data to volatile storage, or storage that does not maintain the data absent periodic application of power. Volatile storage may include, for example, dynamic RAM, static RAM, among other forms of volatile storage. Static RAM is considered volatile storage in spite of studies that show that data may remain persistently stored as long as 13,100 milliseconds after the removal of power from the device. The residual period that data is reliably stored to volatile storage, for example, memory is called remanence.

SUMMARY OF THE INVENTION

The present invention provides a computer implemented method and apparatus to retrieve authentication records required for user validation and creation of authentication credentials from an authentication sever to be passed to the user. The method is comprised of the authentication server storing a first authentication record, then generating a first authentication credential based on the first authentication record. The authentication server associates the first authentication record with a first credential expiration time. The authentication server stores a second authentication record. The authentication server generates a second authentication credential based on the second authentication record, wherein the second authentication credential is associated with a second credential expiration time. Next, the authentication server associates the second authentication credential with a second credential expiration time. The authentication server determines that the first credential expiration time is earlier than the second credential expiration time and caches the first authentication record to cache.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

With reference now to the figures and in particular with reference toFIG. 1, a block diagram of a data processing system is shown in which aspects of an illustrative embodiment may be implemented. Data processing system100is an example of a computer, in which code or instructions implementing the processes of the present invention may be located. In the depicted example, data processing system100employs a hub architecture including a north bridge and memory controller hub (B/MCH)102and a south bridge and input/output (I/O) controller hub (SB/ICH)104. Processor106, main memory108, and graphics processor110connect to north bridge and memory controller hub102. Graphics processor110may connect to the NB/MCH through an accelerated graphics port (AGP), for example.

In the depicted example, local area network (LAN) adapter112connects to south bridge and I/O controller hub104and audio adapter116, keyboard and mouse adapter120, modem122, read only memory (ROM)124, hard disk drive (HDD)126, CD-ROM drive130, universal serial bus (USB) ports and other communications ports132, and PCI/PCIe devices134connect to south bridge and I/O controller hub104through bus138and bus140. PCI/PCIe devices may include, for example, Ethernet adapters, add-in cards, and PC cards for notebook computers. PCI uses a card bus controller, while PCIe does not. ROM124may be, for example, a flash binary input/output system (BIOS). Hard disk drive126and CD-ROM drive130may use, for example, an integrated drive electronics (IDE) or serial advanced technology attachment (SATA) interface. A super I/O (SIO) device136may be connected to south bridge and I/O controller hub104.

An operating system runs on processor106and coordinates and provides control of various components within data processing system100inFIG. 1. The operating system may be a commercially available operating system such as Microsoft® Windows® XP. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. An object oriented programming system, such as the Java™ programming system, may run in conjunction with the operating system and provides calls to the operating system from Java™ programs or applications executing on data processing system100. Java™ is a trademark of Sun Microsystems, Inc. in the United States, other countries, or both.

Instructions for the operating system, the object-oriented programming system, and applications or programs are located on storage devices, such as hard disk drive126, and may be loaded into main memory108for execution by processor106. The processes of the present invention can be performed by processor106using computer implemented instructions, which may be located in a memory such as, for example, main memory108, read only memory124, or in one or more peripheral devices.

Those of ordinary skill in the art will appreciate that the hardware inFIG. 1may vary depending on the implementation. Other internal hardware or peripheral devices, such as flash memory, equivalent non-volatile memory, and the like, may be used in addition to or in place of the hardware depicted inFIG. 1. In addition, the processes of the illustrative embodiments may be applied to a multiprocessor data processing system.

The aspects of the illustrative embodiments provide a computer implemented method, data processing system, and computer program product for enhancing the use of cache with respect to an authentication server. An authentication server may reduce retrieval time of authentication record used for creating the authentication credentials, as compared to the prior art, by more durably caching user authentication record such that those authentication records whose authentication credentials having an expiration time sooner in time are cached at the expense of authentication record whose authentication credentials set to expire later in time.

FIG. 2Ais user authentication data in accordance with an illustrative embodiment of the invention. User authentication data is a user name and a password. The user name and password may be stored at an authentication server or otherwise verifiable at an authentication server. In other words, the password may be encrypted when stored at the authentication server. The meaning of “password” includes an encrypted form of the password. Thus, user authentication data200may include, for example, user name201and password203.

FIG. 2Bis an authentication credential in accordance with an illustrative embodiment of the invention. Authentication credential230is a credential corresponding to Dwip. Authentication credential250is an authentication credential corresponding to Venkat. Authentication credential230includes, default principal231, validity start232, credential expiration time233, and service principal235. The service principal indicates the kerberized service name that is accessible through the use of the authentication credential. Authentication credential250includes default principal251, validity start252, credential expiration time253, and service principal255. It is appreciated that authentication credential may take the form of fixed field width data structures, XML files, comma separated files, among other forms.

FIG. 2Cis an authentication record in accordance with an illustrative embodiment of the invention. The authentication server makes use of the user provided authentication data, explained inFIG. 2Aabove, and compares the authentication data with the authentication record of the user stored at the server location. If the authentication data provided by the user matches the authentication record, the user is successfully authenticated. Next, the server creates an authentication credentials for the user. The authentication server may limit access to the authentication records of all the users such that no authentication record exists outside the authentication server. The authentication record260includes, for example, username261, password information262, attributes263, and user policy265. The username is an arbitrary string to identify a user and a user's allowed features and authority in one or more data processing systems. The user name is sometimes called a user account. Password information is either a password, or an encrypted form of a password. User policy describes a policy associated with the user. The policy can be a duration that authentication credentials remain valid after the authentication credentials are created. Thus, an authentication record is a record that includes at least a user name and password information stored as either plain text or in encrypted form.

FIG. 2Dis a data structure for storing and sorting pairs of authentication records and credential expiration times in accordance with an illustrative embodiment of the invention. The data structure may be a linked list. The linked list may reference authentication records that are in a cache. The linked list may arrange the authentication records in the order of increasing credential expiration times. Accordingly, the linked list may be expiration-indexed. Thus, head of the list258, may have the authentication record having an earliest or lowest credential expiration time, while the tail of the list259, may have may have the authentication record associated with credential expiration time that is highest among those authentication records in the linked list.

FIG. 3is a communication diagram in accordance with an illustrative embodiment of the invention. A client is a device that requests authentication with respect to a server. A client may be, for example, an instance of data processing system100ofFIG. 1. Initially, a user may use client301to transmit a user name and password to a server, for example, Kerberos server305. The user name and password311, in whatever form, make up authentication data. Kerberos server305responds by transmitting authentication credentials313. Authentication credentials may be, for example, a Kerberos ticket. Next, client301may send a user ticket315to server307. Server307may host a Kerberized application. Accordingly, the Kerberized application may respond by providing a user access to data controlled by the Kerberized application. Kerberos server305may be, for example, an instance of data processing system100ofFIG. 1. Accordingly, Kerberos server305may use disk drive126as storage. Storage is a device that holds data regardless of the routine application of power to maintain the integrity of the data. Storage includes, for example, block access devices, disk drives, optical drives, flash memory, random access memory, among others. Similarly, Kerberos server305may use main memory108as cache. A cache is a storage that requires power to be accessible. In contrast, non-volatile storage is storage that does not require power in order to retrieve reliably the data after the remanence period.

FIGS. 4A and 4Bis a flowchart for looking up and authenticating a client in accordance with an illustrative embodiment of the invention. Initially, an authentication server receives a user authentication data from a client (step401). Next, the authentication server may look up an authentication record based on a user name (step402). The authentication server may determine whether there is a matching authentication record in the cache (step403). The authentication record may be in the form shown as authentication record260ofFIG. 2C. A negative determination may cause the authentication server to obtain an authentication record from non-volatile storage using the user name (step404). The process continues to step405thereafter.

It is appreciated that the flowchart ofFIGS. 4A and 4Bmay process many authentication records. Each authentication record or request for user authentication may involve the authentication server to process a different authentication records.

A positive determination at step403may cause the authentication server to authenticate the user using the authentication record and the authentication data (step405). The authentication server may retrieve the first authentication record in step405. Next, the authentication server may determine if the authentication was successful (step406). If the authentication of the client was not successful, then the authentication server may issue an error message407to the client (step407). Processing may terminate thereafter.

However, a correctly authenticated client may cause the authentication server to generate an authentication credential based on the authentication record (step408). Next, the authentication server may form a credential expiration time, and associate the credential expiration time with the authentication credential (step409). Next, the authentication server may determine if there is unallocated space in the cache (step410). If there is unallocated space, then the authentication server may place the authentication record in cache, and update a linked list to include a pair of authentication record and credential authentication time (step412). Next, the authentication server may transmit authentication credential to the client (step439). Processing may terminate thereafter.

However, if there is no space in the cache at step410, the authentication server may traverse a linked list (seeFIG. 2D) to identify a second authentication record with a second credential expiration time larger than the credential expiration time (step411). The ‘credential expiration time’ is from step408, and is a fresh credential expiration time. ‘Fresh’ is a relative term that compares the creation times of two credential expiration times. Thus, a credential expiration time is a fresh credential expiration time relative to a second credential expiration time if the second credential expiration time was created after the fresh credential expiration time.

Next, the authentication server determines if the fresh credential expiration time is earlier than the second credential expiration time (step429). If the fresh credential expiration time is not earlier than the second credential expiration time, the authentication server performs step439. Otherwise, the authentication server removes the second authentication record from cache and places the fresh authentication record in an open linked list record (step431). Following step431, the authentication server stores the second authentication record to storage (step435). Removing the second authentication record from cache is the equivalent of not caching the second authentication record to cache. The authentication server next performs step439.

The illustrative embodiments permit an authentication server to respond in a rapid fashion in an environment where user authentication credentials having a near-future authentication expiration time is high frequency, as compared to access to user authentication credentials having a far-future authentication expiration time. Consequently, such an authentication server may reduce wear on volatile storage associated with access to such storage.