My Portal 4.x account is locked out as the result of too many failed login attempts.
I receive the following error trying to login to the Portal interface: 'The specified username or password was invalid'
How can I unlock it?
To be certain that your portal account is locked out you can login directly to the Portal server and run the
following command to look at the portal_authenticator logs to see what is occurring during the login attempt:
# sudo docker service logs -f portal_authenticator
Attempt to login again and you will see a message similar to the following if the account is locked:
The current state of user: xxxxx is LOCKED
If you wish to unlock the account in question we will first need to obtain the
portal_portaldb container id which we can obtain by running the following:
# sudo docker ps | grep portal_portaldb
de08f5363d9e apim-portal.packages.ca.com/apim-portal/postgres:4.2.0.rc3 "/usr/local/bin/en..." portal_portaldb.1.fi8qmu2izlrhaxtyi6h0phxe6
We then need to get directly into that container by running the following:
# sudo docker exec -it portal_portaldb.1.fi8qmu2izlrhaxtyi6h0phxe6 bash
We then need to connect to the portal psql database:
# psql -U postgres -w -d portal
Connect to the portal db
# \connect portal
We can then run the following queries to enable and unlock a particular account:
update user_info set invalid_login_attempt='0' where username='xxxxx';
update user_info set status='ENABLED' where username='xxxxx';
At this point the account in question will be unlocked and you will be able to
login again with the correct username and password.