pwm icon indicating copy to clipboard operation
pwm copied to clipboard

Web Actions are broken

Open elyscape opened this issue 4 years ago • 7 comments

Describe the bug The master build of PWM can't save Web Actions to the config file and can't read ones added manually. This results in Web Actions being completely broken.

To Reproduce Steps to reproduce the behavior:

  1. Go to the configuration editor.
  2. Click Modules -> Authenticated -> Change Password. Note that, while these steps are for the Change Password action, this also applies to everything else that supports Web Actions.
  3. Under "Post Password Change Actions", click "Add Action".
  4. Type testaction and click "OK".
  5. Click the "Actions" button next to "testaction".
  6. Click "Add Web Service Action".
  7. Type http://google.com and click "OK" twice.
  8. Save the configuration.
  9. Go back to the configuration editor.
  10. Click Modules -> Authenticated -> Change Password.
  11. Click the "Actions" button next to "testaction".
  12. Look at the value in PwmConfiguration.xml for changePassword.writeAttributes.

Expected behavior The configured action should remain configured in the UI. The value of changePassword.writeAttributes should be:

{"name":"testaction","description":"","webActions":[{"method":"get","headers":{},"url":"http://google.com","body":"","username":"","password":"","successStatus":[200]}],"ldapActions":[]}

Actual behavior The configured action vanishes from the UI. The value of changePassword.writeAttributes becomes:

{"name":"testaction","description":"","webActions":[],"ldapActions":[]}

Additional context This does not affect version 1.9.1. I haven't done a whole lot of digging, but it seems likely to have been introduced during the stored configuration refactoring during November 2019.

elyscape avatar May 05 '20 20:05 elyscape

Is this not fixed by commit dd4ce039e8d0b7e82667b4b29ce2068ab05b869a in pull request https://github.com/pwm-project/pwm/pull/541 ? If not I can't reproduce it...

jrivard avatar May 07 '20 20:05 jrivard

That should have been unrelated but I’ll test with that build.

elyscape avatar May 08 '20 05:05 elyscape

The issue remains with that build.

elyscape avatar May 11 '20 20:05 elyscape

Additional details: adding a Web Service Action to an existing change action does not cause it to show in the change summary when going to save the configuration changes.

elyscape avatar May 11 '20 20:05 elyscape

I had this same issue and had to go back to v1.9.1. I am getting "A required service is unavailable. Please try again later." in v1.9.1.

bjustice0387 avatar Dec 28 '20 21:12 bjustice0387

See also: https://groups.google.com/g/pwm-general/c/rmXauvPQQqw

jrivard avatar Jun 04 '22 02:06 jrivard

I have been able to reproduce this issue in v2.0.1. From my testing it fails when a basic auth password value is not included. If a basic auth password is included, the save and reload works fine.

jrivard avatar Jun 04 '22 02:06 jrivard