spring-projects / spring-projects/spring-security

Docs: Outdated reference to samples

Open
#13,610 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: bug
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Describe the bug

The security documentation has a 'samples' chapter: https://docs.spring.io/spring-security/reference/samples.html

This references to 'https://github.com/spring-projects/spring-security/tree/5.4.x/samples' which seems to hold outdated samples. There is a '6.1.x' branch.
Interestingly enough, this branch does not contain the 'samples' directory. 5.4.x was the last one to contain this directory. If this was the reason to choose this branch, then consider my bugreport to be about 'Why are there no current samples?'

To Reproduce
https://docs.spring.io/spring-security/reference/samples.html

Expected behavior
Samples for the selected/appropriate version of Spring Security

I believe the complexity of Spring security and multitude of way to configure things make it even more important to have a carefully curated set of samples with the latest best-practice all the time. It aligns with my experience from my job and daily contact with others in the context of Spring security, that many do now know was the 'recommended' way is. Often using the older (WebSecurityConfigurerAdapter) approaches or mixing lambda with non-lambda approaches.

I believe any definition of one for a release of Spring Security should contain a set of samples that are always curated and follow the recommended practice at this time. These samples do not need to be exhaustive, should probably contain samples for BasicAuth, including/expluding paths, customer Users, maybe OAuth2 and maybe one or two more things.

The advanced topics can have examples as well, but then need to be either commented (e.g. in the code) that they might not always follow the latest recommended practices or be equally re-evaluated and updated each minor/major release.

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.

Research direction

Start with the samples page at docs.spring.io/spring-security/reference/samples.html and inspect the referenced 5.4.x branch alongside the 6.1.x branch. Determine whether the documentation should point to a current sample set or whether samples need to be restored and maintained; done means the reference and its version-specific samples are current and clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
documentation, security
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.