000035314 - Unable to delete a user from the UI in RSA Security Analytics 10.6

Document created by RSA Customer Support Employee on Jul 14, 2017
Version 1Show Document
  • View in full screen mode

Article Content

Article Number000035314
Applies ToRSA Product Set: Security Analytics
RSA Product/Service Type: SA Security Analytics UI
RSA Version/Condition: 10.6.X
 
IssueWhen you delete a user from the UI - Administration > Security > Users tab, the user is not removed from the Users list.
 
CauseYou can see "Referential integrity constraint violation" errors similar to the following one in the /var/lib/netwitness/uax/logs/sa.log file:
 
Error: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: 
"FKD5CE1B1A48FD7373: PUBLIC.SHARED_DASHBOARD FOREIGN KEY(DASHBOARD_ID)
REFERENCES PUBLIC.DASHBOARD(ID) (490)"; SQL statement: delete from Dashboard where user_id =
(select id from Users where id = 192) [23503-172]
ResolutionPerform the following tasks via SSH command line on the SA Server to manually delete the user from the database (H2DB): 
1. Stop the web server:
stop jettysrv

2. Run the following commands to grab the H2DB client::
wget http://edelivery.rsasecurity.com/patches/attach/nw/a66372/h2-1.3.172.jar

3. Copy the H2 client to the following folder:
cp h2-1.3.172.jar /var/lib/netwitness/uax/db/

4. Navigate on the CLI to the DB directory;
cd /var/lib/netwitness/uax/db

5. Access the H2DB;
java -cp h2-1.3.172.jar org.h2.tools.Shell -url jdbc:h2:file:platform

  
6. Execute the following SQL queries one by one (replace xxxxxxx by the user login):
delete from User_Preferences where user_id = (select id from Users where login = 'xxxxxxx');
delete from Notifications where user_id = (select id from Users where login = 'xxxxxxx');
delete from Users_Role where users_id = (select id from Users where login = 'xxxxxxx');
delete from UserPredicate where user_id = (select id from Users where login = 'xxxxxxx');
delete from UserConnectionAttribute where user_id = (select id from Users where login = 'xxxxxxx');
delete from Dashlet_Options where Dashlet_Id in (select Id from Dashlet where Dashboard_Id in (select Id from Dashboard where login = 'xxxxxxx'));
delete from Dashlet where Dashboard_Id in (select Id from Dashboard where User_Id = (select id from Users where login = 'xxxxxxx'));
delete from Dashboard where user_id = (select id from Users where login = 'xxxxxxx');
delete from Favorite_Dashboard where user_id = (select id from Users where login = 'xxxxxxx');
delete from Shared_Dashboard where Dashboard_Id in (select Id from Dashboard where User_Id = (select id from Users where login = 'xxxxxxx');
   
delete from Users where login = 'xxxxxxx';
quit

7. Start the web server:
start jettysrv

Attachments

    Outcomes