CPM Web Applications Plugin - Unable to test or rotate passwords

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

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

CPM Web Applications Plugin - Unable to test or rotate passwords

Hello Community and Happy New Year!

 

With the start of 2021 I've been working on integrating password management for our web application. So far, session management works great with Google Chrome and chrome driver, however password management doesn't and I cannot get the plugin working.

 

I believe I've met all requirements listed here and I also read about other community members' similar issues they are facing here and there. None of the suggested solutions or tips given helped me.

 

Here's what I've done:

  • I have the latest Google Chrome and the latest matching chromedriver installed on our CPM server.
  • For the web application I've created the following files:
  1. [PLATFORM]ElementsData.ini file in the /bin folder. It only contains Verify and Change sections, neither of which functions.
  2. Policy-[PLATFORM].ini in the Samples folder
  3. Policy-[PLATFORM].xml in the /bin folder
  4. user.ini file in the /bin folder

 

The policy .ini and .xml files are from the exported platform.

 

The User.ini contains the following, as I've replaced the clear text wirth dummy variables.

[targetaccount] username=[USERNAME] newpassword=[NewPassword] password=[PASSWORD] safename=[SAFENAME] foldername=Root objectname=[OBJECTNAME]   [extrainfo] VerifyURL=http://test ChangeURL=http://test WebFormFieldsFile=[PLATFORMID]ElementsData.ini RunVerifyAfterChange=No RunVerifyAfterReconcile=No ActionTimeout=10 PageLoadTimeout=30 EnforceCertificate=No

When I attempt to run the test using CANetPluginInvoker.exe, I get error 8221.

This is the command line I use.

C:\Program Files (x86)\CyberArk\Password Manager\bin>CANetPluginInvoker.exe user.ini changepass CyberArk.Extensions.Plugin.WebApp.dll True

The result is:

The plugin ended with return code : 8221

For the record, I am able to access the web application from the CPM server, it is not behind a proxy or any weird network and firewall settings.

 

When I try to execute a password change via PVWA, I get error 8223:

 

Execution error. Change process failed - Failed to parse section Change from line 6. Error: Failed to parse web forms fields. Line number 6. Error code:8223 The CPM is trying to change this password because its status matches the following search criteria: ResetImmediately,OneTimePassword.

In my platform settings under Automatic Password Management/Additional Policy Settings/Parameters my verify and change URLs are correctly set, WebFormFieldsFile points to my [PLATFORM]ElementsData.ini; BrowserPath and DriverFolder point to the correct Chrome and ChromeDriver instances.

 

 

The log file generated under /Logs/ThirdParty doesn't give any more information, as well as pm_error.log

 

PMTrace.log is also reading: "Execution error. Change process failed - Failed to parse section Change from line 6. Failed to parse web forms fields. Line number 6. Error code:8223"

 

This is my ElementsData.ini file, apparently CANetPluginInvoker.exe and CPM are failing to read it. Tried changing the encoding of the file, tried re-creating it, but to no avail.

 

 

[Verify] login_user>{Username}(SearchBy=id) login_pass>{Password}(SearchBy=id) span.uii.uii-arrow-right>(Button)(SearchBy=CSS) login-error>(Failure)(SearchBy=id)(Message="You must specify a valid username and password.") main-title-module>(Validation) (SearchBy=id)   [Change] login_user>{Username}(SearchBy=id) login_pass>{Password}(SearchBy=id) span.uii.uii-arrow-right>(Button)(SearchBy=CSS) login-error>(Failure)(SearchBy=id)(Message="You must specify a valid username and password.") (Navigate=http://URLtoChangePassword/ old_password>{Password}{SearchBy=name) new_password>{newPassword}(SearchBy=name) confirm_new_password>{newPassword}(SearchBy=name) PwForm_save>(Button)(SearchBy=id)

 

Can anyone direct me to what I could be possible missing here?

Any suggestions and hints would be much appreciated 😃

 

Cheers

 

Edit: We're running Core PAS 11.5 environment.

4 REPLIES 4

L7 Applicator

Afaik "(SearchBy=CSS)" is not a valid statement. You can only find an element by its ID, Name, Class, Text, or Xpath... not "CSS" in general. So you would need to convert the "span.uii.uii-arrow-right" string into the appropriate Xpath (or use another method) to find the button to click.

Hi and thanks for the reply!

 

Unfortunately changing the type of SearchBy didn't help. It keeps failing with the same error. I tried with =id, =xpath (full and relative), but to no avail.

Funny enough, I took SearchBy=CSS from a string in the connection component generated using PGU. The PSM session works totally fine and it is able to locate the web element by this CSS tag.

I will keep playing some more with this, hopefully will do some brainstorming with the team to get it working and will update here if we have any success.

 

Cheers ✌️

@Bernhard Brückler​ Another thing I learned which you might also find useful is that starting with version 11.2 of the WebApp CPM plugin framework, SearchBy=CSS is actually supported. You can read the revision details here. Not sure why this isn't included in the support documentation.

I believe I narrowed my problem down to the lack of timout options in ElementsData.ini. I wrote a .NET test using the same web elements and as soon as I added some timeouts/waits here and there magic happened.

It looks like that the CPM plugin isn't waiting for certain web elements to load, attempts to parse their names/ids/xpaths from the .ini file and since it doesn't find them on the web page - it fails with an unrecoverable error. Implementation of an implicit wait in the ElementsData.ini may actually solve many problems people like me are facing.

 

Good to know, thanks!

  • 3152 Views
  • 4 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!