Make SSO session exchange fail closed #48
Labels
No labels
area/core
area/integration
area/release
security
type/bug
type/docs
type/epic
type/feature
type/infrastructure
type/test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#47 Enforce external identity for Ghost Admin sessions
frank/ghost-oauth
Reference
frank/ghost-oauth#48
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Allow the SSO session middleware to reject invalid external identities instead of falling through to an existing Ghost session.
Requirements
Update
ghost/core/core/server/services/auth/session/session-from-token.js.Add a strict or fail-closed mode.
In strict mode, reject requests when:
Remove the Ghost user from the current session before rejecting the request.
Preserve the existing fallthrough behavior when strict mode is disabled.
Acceptance criteria
Further information and implementation sketch
The current middleware returns
next()when one of the SSO stages returns no result:This leaves any existing Ghost session untouched.
A possible extension is to inject a session-removal function and enable strict handling explicitly:
The exact error and fallback behavior should be decided together with the Admin application behavior. The security requirement is that strict-mode failure clears the existing Ghost identity and does not silently continue as that user.
Relevant implementation:
ghost/core/core/server/services/auth/session/session-from-token.jsghost/core/test/unit/server/services/auth/session-from-token.test.js