Get Java Auth API sample code to authenticate consistently with 'Requires Name Lock' enabled
Originally Published: 2008-01-16
Last Modified: 2023-09-25
Article Number
Issue
With "Requires Name Lock" disabled, the SecurID Java Authentication SDK sample code authenticates successfully.
With "Requires Name Lock" enabled, authentications may now fail with "ACCESS DENIED, name lock required" logged at the Authentication Manager.
Cause
The sample code then prompts for a passcode and sends it to the Auth Manager once entered by the user.
If > 30 seconds have elapsed since the name lock was accepted by the Authentication Manager the name lock will have expired and the ACCESS DENIED error message above will be seen in the Auth Manager activity log.
Resolution
...
private void auth() throws Exception
{
String userName;
String passCode;
AuthSession session;
session = api.createUserSession();
userName = io.input("Username: ");
int authStatus = AuthSession.ACCESS_DENIED;
for (int i = 0; i < 3 && authStatus != AuthSession.ACCESS_OK; i++)
{
//don?t do the lock yet
//authStatus = session.lock(userName);
passCode = io.input("Passcode: ");
//have everything?now do name lock and send passcode
authStatus = session.lock(userName);
authStatus = session.check(userName, passCode);
authStatus = finalizeAuth(authStatus, session);
switch (authStatus)
?
Related Articles
Version 7.2.0 documentation references the incorrect file locations for script files in RSA Identity Governance & Lifecycle 78Number of Views How to display Web Logic version information in RSA Authentication Manager ver. 8.x 232Number of Views When running the RSA SecurID Authentication Agent for PAM's acetest utility, getting error: Cannot Do AceInitialize for c… 264Number of Views How to test RSA SecurID Authentication Manager to ID Plus Cloud Access Service connectivity 879Number of Views Configure the SMTP(s) Mail Service 189Number of Views
Trending Articles
Don't see what you're looking for?