spring-projects / spring-projects/spring-data-rest

Possibility to forbid all http verbs/methods by default or at least making this easier to achive

Open
#2,326 0 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Oct 27, 2023.

status: waiting-for-triage
Dominant language
Java
Stars
958
Forks
568
PR merge metrics
No merged PRs in 30d

Description

I have had personal exchanges with Ollie on this point. @odrotbohm, perhaps you would like to comment on your point of view here.

I know some people who are put off by the default behavior of having all their repositories with all http methods exposed and are discouraged from using spring-data-rest. I think they would be more comfortable with allowing specific http methods, at least modifying methods like DELETE, PUT, PATCH etc.

I built a RestConfigurer that first disallows everything and then allows it selectively.

In talking with Ollie, one of the ideas was that there should be an easier way to disallow all http methods or selectively allow individual ones. This could be done e.g. via additional attributes in the RepositoryRestResource annotation. Ollie had still further ideas via configuration switch that one could e.g. over it activate, everything could forbid, which is not explicitly permitted. Of course there are many other ideas and possibilities.

The idea/wish of the issue is that you can discuss about it. Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.