Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Clarified advantages to requiring signed cookies in addition to the use of a high-entropy session ID
  • Loading branch information
gebbber authored Jan 26, 2025
1 parent 4930de7 commit a892751
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,10 @@ would best be a random set of characters. A best practice may include:
- Periodic updates of the secret, while ensuring the previous secret is in the
array.

Using a secret that cannot be guessed will reduce the ability to hijack a session to
only guessing the session ID (as determined by the `genid` option).
Although primary session security is derived from the use of a high-entropy session
ID, the additional use of signed cookies avoids needing to validate the contents of
the cookie, and eliminates the need to implement rate limiting to avoid brute force
attempts.

Changing the secret value will invalidate all existing sessions. In order to rotate
the secret without invalidating sessions, provide an array of secrets, with the new
Expand Down

0 comments on commit a892751

Please sign in to comment.