Fox's Pages
UW home Fox's home Updated: July 31, 2008  

Fox's UW Shib Page - TargetedID for shib 1.3

TargetedID generation at UW for shib 1.3

Summary: This describes a method for Shibboleth TargetedId maintenance using a Postgres database. Examples and downloads cannot not be expected to work without modification at sites other than the University of Washington.
Download: You may consult the example components:
  1. Postgres schema
  2. JDBC connector patch,
  3. Database sync daemon,
A Shibboleth TargetedID is an opaque string, unique to each user and service provider, that can facilitate long-term user sessions, but that cannot be used to identify the user.

Shibboleth does not provide a viable way to maintain TargetedIDs in a production environment. Our method stores TargetedIDs in external databases. generating the values only as needed. Redundant databases, with automatic replication and failover, are provided.

Definititons
These requirements for TargetedIDs are consequential to its definition.

To maintain these TargetedIDs (TID) we use a Postgres database on each Attribute Authority (AA) system. These database servers are configured such that:

Database

  1. Database Schema:

    The Postgres database maintains both the TargetedID information and the associations of service providers and their domains.

    Table*Contents
    tgtidsone row for each user/sp_domain combination.
    pnoa unique number assigned by us to each provider domain (which may contain multiple SPs).
    regidour invarient user identifier (uwRegID).
    tgtidthe TargetID: 128 random bits (from MD5), as a hex string
    sp_domainsone row for each provider domain.
    pnothe provider domain number
    domain_namethe provider domain's name
    spsone row for each service provider .
    pnothe SP's provider domain number
    spidSP's providerID

      * Selected columns only

  2. Query and Update Functions:

    Stored procedures on the database either

    1. returns an existing TID for a user-SP combination;
    2. generates, inserts into the table, and returns a new TID if one does not exist and the DB is master; or.
    3. returns a NULL value if the DB is a slave.
    4. See the procedure details.

  3. Replication:

    A background process on each slave system monitors the master and keeps its local DB updated with new SPs or TIDs. In loss of the master one of these processes will promote its DB to master.
Shibboleth data connector
A modified JDBC data connector plugin for Shibboleth version 1.3 allows the shibboleth AA to these databases. Modifications to the stock connector are:

Database sync daemon
A daemon process, running on each database system, performs continual maintenance of the system.

These daemons also report the status of their database to the University's monitoring system.

Example
This example shows a TargetedID generated from the SP id and the user's registry id, rather that her userid.