Auditing user last login information in Harvest SCM
search cancel

Auditing user last login information in Harvest SCM

book

Article ID: 441126

calendar_today

Updated On:

Products

CA Harvest Software Change Manager CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction

How are "last login" details for users stored and retrieved from Harvest, specifically when integrating with external authentication providers like SAML or LDAP?  Is this data written to a database or text file?

Environment

CA Harvest Software Change Manager (All Versions)

Resolution

You can retrieve user login details from two primary sources within the Harvest environment: the database and the broker log files.

1. Querying the Harvest Database You find the most recent successful login timestamp for every user in the HARUSER table. Use the following SQL query to extract this information:

(for Oracle databases)

SELECT USERNAME, TO_CHAR(LASTLOGIN, 'mm/dd/yyyy hh:mi:ss') LASTLOGIN FROM HARUSER;


(for SQL Server databases)

SELECT USERNAME, LASTLOGIN FROM HARUSER;


If you require a history of login attempts (including failures) for auditing, you query the HARAUDITLOGVIEW. This view tracks specific audit events, including login actions:

(for Oracle databases)

SELECT USERNAME, TO_CHAR(EVENTTIME, 'mm/dd/yyyy hh:mi:ss') EVENTTIME FROM HARAUDITLOGVIEW WHERE ACTIONOBJID = 411; 


(for SQL Server databases)

SELECT USERNAME, EVENTTIME FROM HARAUDITLOGVIEW WHERE ACTIONOBJID = 411; 


(Note: ACTIONOBJID 411 represents the login action code).

2. Reviewing Broker Log Files You can also find login activity recorded as text in the broker logs. These files provide a chronological history of user registrations and login attempts.

  • Location: You locate these files in the <Harvest installation folder>\log directory (defaulting to %CA_SCM_HOME%\log).
  • Filename: Look for *HBroker*.log files
  • Search Criteria: You search these logs for the string "On User register". Each login attempt generates an entry in this format, including the username and client information.

If you are using external authentication (SAML/LDAP), Harvest still updates these internal records during the authentication handshake.

Additional Information

See also:

Auditing user access to Harvest system

About the Harvest Audit Log

Location of the Harvest log files