CP agent cache behavior

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CP agent cache behavior

L2 Linker

Hello community,

This issue has been detect and solved, so I post it here to let you know about this and share my experience:

 

Caching behavior

There is a behavior that can cause trouble with the cache and show up errors in the log file (log file location is: "C:\Program Files\CyberArk\ApplicationPasswordProvider\Logs\APPConsole.log")

 

Let's assume that we retrieved an account with parameters "safe" and "username". At the time of the initial request, it was the only occurrence of this username in that safe, so everything worked like a charm and the agent cached this account locally.

 

Then, after some times, we onboarded other accounts, with the same username, in the same safe. These accounts have been onboarded for other needs and on other addresses. Of course, the request that we use on the CP has been adapted to include the address, otherwise we'd got the error that too many accounts exists with the same attributes.

 

At this point, the next time that the agent will try to refresh the cache, he will get an error that too many accounts exists with the same attributes. This is due to the fact that the CP will do a request to refresh the cache entries with same parameters than the initial request. So in that case, using "safe" and "username" for the first entry that he cached (even if we modified the call afterwards) - but, as we added some accounts with same username in the same safe, we got now the error for this account because the address was not part of the initial request.

So now in the cache, we have a first entry with "safe" and "username" (that make the error), and a others with "safe", "username", and "address" (that work perfectly).

 

The only way of getting ride of this error is to cleanup the cache. Then, the next time that the new request is used to retrieve the account, it will be cached the right way - including the address and avoiding any errors in logs.

 

Cache clean-up

  1. Stop the “CyberArk Application Password Provider” service
  2. Delete the file “C:\Program Files\CyberArk\ApplicationPasswordProvider\Cache\appprovider_cache.dat”
  3. Start the “CyberArk Application Password Provider” service

 

I hope that this will help some of you in case that you got the same issue.

1 accepted solution

Accepted Solutions

L7 Applicator

Hey @Nicolas Honsberger​ 

Very interesting write up! thanks for sharing this.

 

-Matt

View solution in original post

6 REPLIES 6

L7 Applicator

Hey @Nicolas Honsberger​ 

Very interesting write up! thanks for sharing this.

 

-Matt

L2 Linker

Thank you for your positive feedback @Matt Jennison​, much appreciated !

I wasn't sure if it was the good place to post that, feel free to move it if needed.

Nico

If you'd like we can work together to get this into a knowledge article that is accessible via our search engine. We would credit you as the author, similar to other articles and blogs that we've got.

 

If this is something you'd like to work on with me reach out to [email protected] and we'll get started!

 

-Matt

L2 Linker

Would love to know the exact error messages that you got 🙂

Great KB anyways!

Hello,

Thank you for your comment and sorry for the late answer.

The full part of log regarding that issue is the following:

 

[dd/mm/aaaa | hh:mm:ss] |  ::  | APPAP032I Main parameters file [main_appprovider.conf.Win.13.00] was loaded successfully

[dd/mm/aaaa | hh:mm:ss] |  ::  | APPAP258I Supported addresses for this provider [IP_ADDRESS;SERVER_NAME;SERVER_NAME_FQDN]

[dd/mm/aaaa | hh:mm:ss] |  ::  | APPAP341I Found cache encryption key in cache safe for Credential Provider user Prov_SERVER_NAME

[dd/mm/aaaa | hh:mm:ss] |  ::  | APPAP035I Application Password Provider [Prov_SERVER_NAME] on machine [IP_ADDRESS] version [13.0.0.6] is up [AAM mode] and working with Vault [VAULT_IP_ADDRESS]

[dd/mm/aaaa | hh:mm:ss] |  ::  | APPAP251E Too many password objects matching query [Folder=root;safe=SAFE_NAME;Username=USERNAME;] were found. The system will use the password that is already in the cache. However, this is state is not valid and must be fixed. See trace log for more information) (Diagnostic Info: 1)

 

Best Regards.

I have reach out, thank you!

  • 1 accepted solution
  • 688 Views
  • 6 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!