GridShibCA::myVocsCertRegistry.pm

Implementation of GridShibCA::CertRegistry which registers certificate with myVocs using a back-channel database connection to myVocs. Provides functionality of GridShibCA::CertRegistry in addition.

Configuration Parameters

This class uses the following values from gridshib-ca.conf:

myVocsDBName
Name of the myVocs database.

myVocsDBTable
Nma of the myVocs database table.

myVocsDBHostname
Host on which the database is running.

myVocsDBPort
Port on which the database is running.

myVocsDBUsername
Username to authenticate to the database.

myVocsDBPassword
Password to use to authenticate to the database.

Methods

new()
Create a new myVocsDBCertRegistry object.

Arguments: None

Returns: CertRegistry instance

registerCert()
Record an issued certificate (both locally and with myVocs).

Arguments:

$userId - User identity as a string.

$idp - IDP for user as a string.

$dn - DN issued to user as a string.

$certificate - PEM-encoded certificate as a string.

Returns: One on success, zero on error

Internal methods

These internal methods not intended for external use.

_sendDBCommand()
Prepare and send command to database. On error it calls calling _error()

Arguments:

$DBconnection - Database connection handle from DBI->connect()

$cmdStr - command string

Returns: 1 on success. 0 on error

_myVocsTimeString()
Convert time in seconds to the string needed by the myVocs database (e.g. ``2005-03-08 19:14:32'')

Arguments: Time in seconds

Returns: Time string as needed by myVocs

Version

GridShib-CA version 0.4.0 ($Id: myVocsDBCertRegistry.pm.in,v 1.3 2007/03/16 23:01:53 welch Exp $)