question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

server.reactive.session.cookie properties are not documented

See original GitHub issue

Hi, this is a first-timers-only issue. This means we’ve worked to make it more understandable to people who haven’t contributed to our codebase before and are just getting started with making open source contributions in general.

If that’s you, we’re interested in helping you take the first step and can answer questions and help you out as you do. Those questions can be about the code, working with Git and GitHub – anything that you need some help with to make the contribution. Note that we’re especially interested in contributions from people from groups underrepresented in free and open source software!

If you have had a pull request merged before, consider leaving this one for someone new, and looking through our general ideal-for-contribution issues. Thanks!

Problem

@DidierLoiseau has pointed out that the server.reactive.session.cookie properties are not documented. This means that they aren’t listed in the reference documentation or in the metadata that enables auto-completion in an IDE when editing application.properties and application.yaml files.

The entries in the reference documentation are generated from the metadata so it’s the metadata that needs to be corrected. It is generated using an annotation processor. The properties are defined on a Cookie class, an instance of which is used by ServerProperties.Reactive.Session:

https://github.com/spring-projects/spring-boot/blob/a4bafa88bc167eaff7e0cbf7bfe36da742db2b15/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java#L326

The annotation processor doesn’t know that Cookie contains nested configuration properties so no metadata is generated.

Solution

org.springframework.boot.autoconfigure.web.ServerProperties.Reactive.Session should be updated to add @NestedConfigurationProperties to its cookie field. The source for this class is in ServerProperties.java that can be found at spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java in your git clone of the codebase.

The reference documentation can then be built (./gradlew spring-boot-project:spring-boot-docs:asciidoctor) to check that the property is now documented. The built documentation can be found beneath spring-boot-project/spring-boot-docs/build/docs/.

Steps to Fix

  • Claim this issue with a comment below and ask any clarifying questions you need
  • Set up a repository locally following the Contributing Guidelines
  • Try to fix the issue following the steps above
  • Commit your changes and start a pull request.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:20 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
wilkinsonacommented, Jul 28, 2022

As this is a first-timers-only issue, we want to keep the scope quite narrow. If further changes are necessary, we’ll open another issue to tackle those. Thanks for the suggestions.

1reaction
wilkinsonacommented, Jul 28, 2022

I would import everything by pointing your IDE at the root of your local git clone of the code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application property "server.servlet.session.timeout" is not ...
You can use Approach 1: server.servlet.session.timeout=30s server.servlet.session.cookie.max-age=30s. It is working fine for me.
Read more >
Web on Reactive Stack - Spring
This part of the documentation covers support for reactive-stack web applications built on a Reactive Streams API to run on non-blocking ...
Read more >
A Guide to Spring Session Reactive Support: WebSession
We've learned how to add Spring WebSession to our WebFlux applications. For more information, check out the great official documentation. As ...
Read more >
Enable secure session cookies and set application cookies as ...
The unsecure cookies issue is commonly raised in penetration test reports performed on OutSystems applications if the environment they're ...
Read more >
Using HTTP cookies - MDN Web Docs
An HTTP cookie (web cookie, browser cookie) is a small piece of data that a server sends to a user's web browser. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found