Repository navigation
Conversation
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.
Summary
LoginEvent; separately configured providers retain their own authentication. Logout continues to clear authentication in place.Server.RotateSessionOnLoginfor deployments with a concrete session-fixation path. Opting in retains the previous new-session behavior and its spare-session-slot requirement.CurrentClaimsbehind the pending login event, so a hook can revoke a login before other requests use its claims. Reload active JaWS pages after the event completes. Keep application logger callbacks outside the login lock.Why
JaWS binds sessions to the effective client IP, including trusted proxy headers when configured. Rotation helps only when an attacker can make a victim use a known pre-login cookie, reach JaWS from the same effective IP, and cannot obtain the later cookie. It does not help against control of the browser or post-login traffic. The default avoids replacing application session data and requiring a spare slot at login.
The HTTPS cookie-prefix change in linkdata/jaws#544 narrows ordinary cookie planting paths. The code changes are independent; merge this PR before JaWS #544 because its AI guidance describes the new jawsauth API. JaWS v0.902.0 still uses unprefixed HTTPS cookies; the
__Host-protection applies after JaWS #544 is released and adopted. Applications should enable rotation whenever they have a concrete cookie-planting path, including on plain HTTP.Verification
go test -race -timeout=120s ./...(root module)go test -race -timeout=300s ./...(cmdmodule)go vet ./...,staticcheck ./...,golangci-lint run, andgosec ./...in both modulesgofmt -l .andgit diff --check