Sometimes the web agent's AceClient.log can be difficult to read, with many cookie and Cross-Site Request Forgery (CSRF) messages clouding the log file. When using SharePoint, symptoms such as the error below are seen:
Failed to get HTTP_COOKIE with error 183, <name>cookie_OFFICE_PERSISTENT, Get User Name from cookie api
failed, local failed - look for domain cookie and
File:rsacookieapi.cpp Line:233 # Buffer copy error occurred in SDTraceMessage while writing log
"Buffer copy error occurred in SDTraceMessage" are often related to the use of a named Microsoft cookie
which the RSA agent is unaware of - configure the Use of Domain Cookies
Alternatively, sometimes there is not enough detail in the AceClient.log, due to insufficient privileges for the various API calls when writing to the \Windows directory. To prevent this, change the location of the AceClient.log on the IIS server in the registry, to a folder with wide open permissions to everyone.
Alternatively, sometimes there is not enough detail in the AceClient.log, typically due to insufficient privileges. To prevent this, create a registry entry on the IIS server that defines a new location for the AceClient.log to a directory with open permissions to everyone. To make this change,
- Set the log file to write to an unprotected folder by creating such a directory on the server, for example RSALogs.
- Opening a registry editor and navigating to HKEY_LOCAL_MACHINE\SOFTWARE\SDTI\ACECLIENT.
- From the Edit menu, click Add Key and create a key named TraceFile, with a type of REG_SZ.
- Set the value of TraceFile to C:\RSALogs\AceClient.log.
- Reboot the server for the change to take effect.
RSA implemented a logoff cookie check to prevent hackers from using a copied cookie. See the RSA knowledgebase article on how an authenticated user needs to re-authenticate if one of the clustered RSA SecurID web agent is rebooted that has been set up for multiple server authentication.
Every time a user logs off, a copy of their cookie is stored in cache and every time any other user presents a cookie, a cache lookup is performed. This has two effects:
- The web agent becomes very busy; and
- The verbose logs become crowded with CSRF cookie messages, making them difficult to read.
Later versions of the agent prevent Java from hijacking the RSA cookie. While this might not prevent a hacker from walking up to an unlocked console and using a browser tool to copy cookies, it may be reasonable to disable the RSA Logoff Cookie check environment variable. To do this on the Windows 2012 server running the agent,
- Open the Group Policy Management Console. Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit.
- In the console tree under Computer Configuration or User Configuration, expand the Preferences folder, and then expand the Windows Settings folder.
- Right-click the Environment node, point to New, and select Environment Variable.
- In the New Environment Variable Properties dialog box, select an Action for Group Policy to perform.
- Create an environment variable named RSA_NO_LOGOFF_COOKIE_CHECKING and set the value to 1 to turn it off.
- Click the Common tab, configure any options, and then type your comments in the Description box.
- Click OK. The new preference item appears in the details pane.
A second source of log messiness is Cross-Site Request Forgery Protection (CSRF) enabled in the RSA IIS agent by default. Turn off the option to Use RSA Token for Cross-Site Request Forgery Protection through the IIS Manager, as in the example below:
Image description
Note that CSRF is not cross-site scripting (XSS), and is not an easy exploit to pull off, but you may want to re-enable the option after debugging the web agent issue. See articles on CSRF versus XSS for more information. The main difference being XSS exploits the trust a user has for a particular site, while CSRF exploits the trust that a site has in a user's browser.