SEC-2355: intercept-url does not support method=PATCH #2582

Closed
spring-issuemaster opened this Issue Oct 7, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster

Collin Peters (Migrated from SEC-2355) said:

With the following code

<!-- OAuth 2 scopes for GET/POST/PUT/PATCH/DELETE -->
<security:intercept-url pattern="/**" method="GET" access="#oauth2.hasScope('read')" /> 
<security:intercept-url pattern="/**" method="POST" access="#oauth2.hasScope('write')" /> 
<security:intercept-url pattern="/**" method="PUT" access="#oauth2.hasScope('write')" /> 
<security:intercept-url pattern="/**" method="PATCH" access="#oauth2.hasScope('write')" /> 
<security:intercept-url pattern="/**" method="DELETE" access="#oauth2.hasScope('delete')" /> 

I get the following error:

Caused by: org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 93; cvc-enumeration-valid: Value 'PATCH' is not facet-valid with respect to enumeration '[GET, DELETE, HEAD, OPTIONS, POST, PUT, TRACE]'. It must be a value from the enumeration.

We would like to support the PATCH method in our API in order to support partial updates.

@spring-issuemaster

This comment has been minimized.

Show comment Hide comment
@spring-issuemaster

spring-issuemaster Oct 7, 2013

Collin Peters said:

Is this as simple as adding PATCH to spring-security-3.2.xsd?

Collin Peters said:

Is this as simple as adding PATCH to spring-security-3.2.xsd?

@spring-issuemaster

This comment has been minimized.

Show comment Hide comment
@spring-issuemaster

spring-issuemaster Nov 14, 2013

Rob Winch said:

Yes :)

Rob Winch said:

Yes :)

@spring-issuemaster

This comment has been minimized.

Show comment Hide comment
@spring-issuemaster

spring-issuemaster Nov 14, 2013

Collin Peters said:

Submitted pull request: #55

Collin Peters said:

Submitted pull request: #55

@spring-issuemaster

This comment has been minimized.

Show comment Hide comment
@spring-issuemaster

spring-issuemaster Nov 15, 2013

Rob Winch said:

Thanks for the pull request. I have pushed that along with a test that I have added.

Rob Winch said:

Thanks for the pull request. I have pushed that along with a test that I have added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment