Accounts Automatic Unlock not working
Symptom
The user has activated the exclusive access policy. Accounts are locked when check-in and accounts are checked-out if manually pressed release.
Has configured automatic accounts unlock using the following article:
https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PASIMP/AutoUnlockinPSM.htm
However, automatic unlock does not work, and accounts stay locked when the PSM session is ended.
Environment
12.0;12.1;12.2;12.4;12.3;12.5;14.0 Privileged Access Manager (PAM, self-hosted) PSM PSM
Cause
According to the PSM errors below, the apigw.cred file is missing and is needed to auto-unlock the account session:
[23/06/2022 | 14:12:22.524361] | {pid= 3720} | {tid= 2312} | class CPSMRESTHandler * | PSM\(35) | :: | PSMSR1260I Going to call REST https://pvwa_url/passwordVault/api/accounts/21_1/Unlock
[23/06/2022 | 14:12:22.524509] | {pid= 3720} | {tid= 2312} | | Caso\(2392) | :: | CASGS028E Cred File C:\Program Files (x86)\CyberArk\PSM\Vault\apigw.cred was not found.
[23/06/2022 | 14:12:22.524558] | {pid= 3720} | {tid= 2312} | static CCAGCryptoSvcs | Caso\(2589) | :: | Failed getting private key from credentials file
[23/06/2022 | 14:12:22.524718] | {pid= 3720} | {tid= 2312} | class CPSMBaseException * | PSM\(68) | :: | PSMSR009I Privileged Session Manager exception occurred. PSMSR1258E REST call failed. reason: Failed to get cred file key algorithm (CASGS046E Failed to get the key algorithm from credentials file, Reason(Failed getting private key from file). [CASGS046E]). exception (Codes: -1, -3)
[23/06/2022 | 14:12:22.524768] | {pid= 3720} | {tid= 2312} | class CPSMTSSessionServiceBase * | PSM\(1131) | :: | PSMSR1302E Unlock REST failed PSMSR1258E REST call failed. reason: Failed to get cred file key algorithm (CASGS046E Failed to get the key algorithm from credentials file, Reason(Failed getting private key from file). [CASGS046E]). exception
Resolution
Create a new apigw.cred file using the command and tool as follow:
ApiKeyManager.exe add -f "C:\Program Files (x86)\CyberArk\PSM\Vault\apigw.cred" -t PSMApp_ab12345 -u administrator -a https://xyz.eu.com/PasswordVault/api
Please see below document “During PSM installation” for creating apigw.cred:
https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PASIMP/AutoUnlockinPSM.htm?Highlight=apigw.cred#DuringPSMinstallation