Repository navigation
LINDAT/fix(security): harden dsAuthInfo auth cookie with Secure and SameSite - #1688
Merged
milanmajchrak merged 1 commit intoNov 2, 2026
Merged
Conversation
…ameSite * Harden dsAuthInfo auth cookie with Secure and SameSite attributes Set secure and sameSite='lax' on the auth JWT cookie written in storeToken(), as defense-in-depth. The Secure flag is derived from the actual page protocol (location.protocol === 'https:') so it is applied on any https page, including behind a TLS-terminating reverse proxy, while local http dev still works. 'lax' is used rather than 'strict' so the cookie is still sent on the top-level navigation that returns from external authentication. * docs: shorten auth cookie security comment --------- Co-authored-by: Matus Kasak <matus.kasak@dataquest.sk> (cherry picked from commit 9bcd483) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Description
The
dsAuthInfoauth cookie getsSecureon https pages andSameSite=Lax.Instructions for Reviewers
List of changes in this PR:
9bcd48382674with-x, no changes. The original author stays.LINDAT/title and GitHub refs written as plain text.How to test:
auth.service.spec.ts. By hand: log in over https and check the cookie flags in the browser dev tools.AI Disclosure
Claude Code made the cherry-pick and wrote this description.
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.🤖 Generated with Claude Code