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 728 forks source link

X-HTTP-Method-Override Support #17565

Closed isuruirj closed 1 week ago

isuruirj commented 1 year ago

Hi Team,

The X-HTTP-Method-Override header is not recognized in 5.11.0, it returns a 405 Method Not Allowed response for the following request.

curl -v -k --user admin:admin -X POST -d '{"schemas":["urn:ietf:params:scim:api:messages:2.0:PatchOp"],"Operations":[{"op":"replace","value":{"nickName":"isuruj"}}]}' --header "Content-Type:application/json" --header 'X-HTTP-Method-Override: PATCH' https://localhost:9443/scim2/Users/45fbf474-4aa6-4bc2-bc81-dc8bbb2cb528 

Even though CXF supports overriding request methods, by default this is not allowed (since CXF 3.3.4) for a CXF service[1]. To enable HTTP method overriding, we can specify the "org.apache.cxf.jaxrs.allow.http.method.override" endpoint property as "true" in cxf-servelet.xml file for relevant endpoints. We have done a similar thing to enable HTTP method overriding in scim Group endpoint[2].

[1] - https://cxf.apache.org/docs/jax-rs.html [2] - https://github.com/wso2-extensions/identity-inbound-provisioning-scim/pull/111

Thanks

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!