spring-projects / spring-projects/spring-security

Further document adding types to the Jackson allowlist

Open
#16,015 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Given some of the responses in #4370, it would likely be helpful to add to the Jackson documentation, detailing the rationale for how things are and some simple samples for how to extend it.

It would also be nice if the snippets added to this documentation were included directly from tests in Spring Security to ensure their ongoing compatibility. Spring Session follows a pattern of including testable documentation snippets inside of the documentation.

This may be an opportunity to revisit the allowlist error message to see if it can be improved:

The class ... {className} ... is not in the allowlist. If you believe this class is safe to deserialize, please provide an explicit mapping using Jackson annotations or by providing a Mixin. If the serialization is only done by a trusted source, you can also enable default typing. See https://github.com/spring-projects/spring-security/issues/4370 for details

Possibly, it would be nice to point to the additional documentation.

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 by reviewing the Jackson allowlist documentation context and the responses in issue #4370, then compare Spring Session's testable documentation snippet pattern. Done means documenting the rationale and extension samples, keeping snippets compatible with Spring Security tests, and deciding whether the allowlist error should link to the additional documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation, security
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.