wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 729 forks source link

The Enable and Disable User Accounts documentation contains an invalid SCIM2 Users request #16002

Closed deshankoswatte closed 1 week ago

deshankoswatte commented 1 year ago

Is your suggestion related to a missing or misleading document? Please describe.

The Enable and Disable User Accounts documentation available at [1] contains the following SCIM2 Users PATCH request.

curl -v -k --user admin:admin -X PATCH -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"replace","value":{"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{"accountDisable":"true"}}}]}' --header "Content-Type:application/json" https://localhost:9443/scim2/Users/<User-ID>

The above request mentions an invalid attribute name for the account disabled field. It should be "accountDisabled" instead of "accountDisable" hence the documentation should be updated properly to avoid any confusion at the users end mainly because the invlaid request also returns a 200.

[1] - https://is.docs.wso2.com/en/latest/guides/identity-lifecycles/enable-account/

Describe the improvement

The SCIM2 Users request should be updated to the proper one. The below provided request is a sample which was tested by me for the WSO2 Identity Server version 6.1.0.

curl --location --request PATCH 'https://localhost:9443/scim2/Users/32a34edc-94c6-40d4-aa42-08be4545cb38' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--data-raw '{
    "Operations": [
        {
            "op": "replace",
            "value": {
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                    "accountDisabled": false
                }
            }
        }
    ],
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:PatchOp"
    ]
}'

isharak commented 1 week ago

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!