CA API Portal 4.2 How to unlock the admin account and reset it's password

Document ID : KB000095946
Last Modified Date : 20/09/2018
Show Technical Document Details
  • How do I unlock the admin account and reset it's password in CA API Developer Portal ("Portal")?
  • CA API Developer Portal 4.2
  • When the admin user is locked (due to several login attempts with wrong password), the database can be updated to revert the user status and reset the password to a default value. The steps below will allow the account to be unlocked and the password to be reset.
  1. Unlock the admin user account.
    1. ​Run the following to quickly identify the Database container: docker ps | grep portal_portaldb.1  
    2. From the output, retrieve the container ID and use it to gain access to its shell prompt: docker exec -it <CONTANEIR_ID> /bin/sh
    3. Once at the prompt, run the following to access postgres console: psql portal admin
    4. Enable the postgres expanded output format by running: # \x
    5. Review the admin account lock status by running the following query: select * from user_info where username='admin';
    6. You should see that the locked account has the status set to "locked" and invalid_login_attempt set to a number greater than 3.
    7. Update the table that is locking the account by running the following: update user_info set status='ENABLED', invalid_login_attempt=0 where username='admin' and tenant_id='apim';
  2. Reset the admin user password.
    1. To reset the admin password back to the default of 7layereyal7, the following query should be run: update user_info set password_salt='5b6085dc-461e-4698-afb6-2ed0cf6c88df', password_hash='AcXNHGp/7/8FYgd9VatEU8AuzJmRsR0DUt2zN9qw40nJFGr3B6Kd0Le7A2YhT6NnCEiNNFf05YOXjR9YGqZk3A==' where username='admin' and tenant_id='apim';
    2. Log into Portal Web UI and assign a new password to the admin user.