Home > Technical > RSA > RSA – Authentication Manager 7.1 SDK Example

RSA – Authentication Manager 7.1 SDK Example

The RSA Authentication Manager SDK provides sample vbs scripts that you can run directly against the sql database. Below are a couple of examples.

Note: This script outputs the result in a csv file in the directory it was run from… In this example, we’re running a report of users who have not logged in for 90-days. You also need to edit the vbs script with your site specific connection information. The example in this case uses the following test lab system:

‘————————————————————————
‘* AM Database Connection Parameters
AM_Hostname = “rsa7lab1″ ‘Short hostname or IP of the AM Server
AM_Port = “2334″ ‘Port that the AM Database is listening on. Default 2334.
AM_DB_Service= “kk9xvvfu” ‘Service name defined in \db\network\admin\tnsnames.ora without the .ims.rsa suffix.
AM_DB_RptUser= “system” ‘Read Only DB user for reporting
AM_DB_RptPass= “WBY1ta9jk5″ ‘Read Only DB password for reporting

‘————————————————————————

Here is how you run it:

Open a command prompt
C:\>cd “C:\Documents and Settings\ydemissi\Desktop\”

C:\Documents and Settings\ydemissi\Desktop>cscript SQLsample.vbs ?

Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Usage: cscript SQLsample.vbs
Where
is a number 1 through 4
1 – Export users with tokens to a CSV file
2 – Export users with multiple tokens to a CSV file
3 – Export users with unused tokens to a CSV file
4 – Export the contents of a table to a CSV file

C:\Documents and Settings\ydemissi\Desktop>cscript SQLsample.vbs 3

Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

Running Users With Unused Tokens Query

QuerySQL = SELECT ip.first_name,ip.last_name,ipd.loginuid,ipd.exuid,ipd.identity
_src_key,isrc.name,atk.serial_number,atk.token_type,to_char(ato.last_login_date,
‘MM-DD-YYYY’) as lastlogin FROM rsa_rep.ims_principal ip, rsa_rep.ims_principal_
data ipd, rsa_rep.am_token atk, rsa_batchrep.am_token_oob ato, rsa_rep.ims_ident
ity_source isrc WHERE ipd.id = atk.principal_id AND atk.id = ato.am_token_id AN
D ipd.identity_src_id=isrc.id AND ato.last_login_date < sysdate - 90 AND ipd.ide
ntity_src_key = ip.id(+)

Output File: UsersWithUnusedTokens.csv

Completed.

C:\Documents and Settings\ydemissi\Desktop>dir

Volume in drive C is HY136979
Volume Serial Number is 9438-5FB0

Directory of C:\Documents and Settings\ydemissi\Desktop

08/09/2011 09:25 AM

.
08/09/2011 09:25 AM ..
08/09/2011 09:25 AM 299,424 UsersWithUnusedTokens.csv
1 File(s) 14,573,789 bytes
2 Dir(s) 6,825,291,776 bytes free

C:\Documents and Settings\ydemissi\Desktop>

Copyright © 2012-2017 Yared Consulting Inc. All Rights Reserved. | Privacy Policy | Terms & Conditions