简体   繁体   中英

WSO2 Scim2 Password Change

I am currently using IS 5.5.0 and utilizing the SCIM2 API to provision users that will eventually need their passwords changed. I have successfully created the users using the POST operation and can update certain attributes using the PATCH operation. My question is, can I update the user's password using the PATCH operation using the scim2/Users/(.*) endpoint? I've been unsuccessful so far. Here is a sample request:
PATCH https://myhostname:9443/scim2/Users/f7853b65-e4e8-47b0-a000-e113f95cda63 HTTP/1.1
With a request body of:
{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations":[{ "op":"replace", "path":"password", "value":"asdf" }] }
I haven't been able to find any documentation leading a definitive answer so any feedback would be appreciated. Thank you.

There was a known issue when updating password field using SCIM2 APIs in IS 5.5.0 (via PUT/PATCH). Please refer [1] for more information on this. However this was fixed in IS 5.6.0. Can you please try the same with IS 5.6.0?

[1] https://github.com/wso2/product-is/issues/3009

Try this.

curl -v -k 
    --user admin:admin 
    -X PATCH 
    -d '{"password":"test123"}' 
    --header "Content-Type:application/json" 
    https://localhost:9443/wso2/scim/Users/f7853b65-e4e8-47b0-a000-e113f95cda63

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM