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?
CA Harvest Software Change Manager (All Versions)
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.
If you are using external authentication (SAML/LDAP), Harvest still updates these internal records during the authentication handshake.