pwm
pwm copied to clipboard
Web Actions are broken
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:
- Go to the configuration editor.
- 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.
- Under "Post Password Change Actions", click "Add Action".
- Type
testaction
and click "OK". - Click the "Actions" button next to "testaction".
- Click "Add Web Service Action".
- Type
http://google.com
and click "OK" twice. - Save the configuration.
- Go back to the configuration editor.
- Click Modules -> Authenticated -> Change Password.
- Click the "Actions" button next to "testaction".
- Look at the value in
PwmConfiguration.xml
forchangePassword.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.
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...
That should have been unrelated but I’ll test with that build.
The issue remains with that build.
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.
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.
See also: https://groups.google.com/g/pwm-general/c/rmXauvPQQqw
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.