MBA-715: Implement Session Management and NIST 800-53 IA-11 Compliant Re-authentication #28
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.
MBA-715: Implement Session Management and NIST 800-53 IA-11 Compliant Re-authentication
Summary
This PR implements 19 standalone Java classes for session management and NIST 800-53 IA-11 compliant re-authentication in the
Commonmodule. This is Part 1.5 of the microservices conversion epic, designed to be framework-agnostic and ready for future integration with Part 1.1 (Core Framework) and Part 1.2 (Authenticator Management).Key Components Implemented:
gov.uspto.session.model): Core session entity with NIST IA-11 compliance fields for tracking re-authentication requirementsgov.uspto.session.management): SessionManager orchestrator, SessionStore interface, SessionFactory, SessionValidatorgov.uspto.session.reauth): Policy-based re-authentication triggers for privilege escalation, role changes, security attribute changes, and timeoutsgov.uspto.session.security): Cryptographically secure session IDs (SecureRandom), AES-GCM encryption, anti-hijacking measures (IP/User-Agent binding), session tokensgov.uspto.session.lifecycle): Session creation/termination/renewal services, concurrent session managementNIST 800-53 IA-11 Compliance:
Testing:
Dependencies:
bcprov-jdk15on 1.70) for enhanced cryptographic supportReview & Testing Checklist for Human
Verify NIST 800-53 IA-11 compliance requirements - Review the re-authentication triggers (ReauthenticationPolicy, ReauthenticationTrigger) to ensure they meet your organization's security requirements. The implementation supports time-based, privilege escalation, role change, and security attribute change triggers.
Review placeholder logic for authentication integration -
PrivilegeChangeDetectorhas placeholder methods (getCurrentPrivileges(),getCurrentRole()) that read from session security attributes. Verify this approach is acceptable until Part 1.2 (Authenticator Management) is implemented.Confirm SessionStore interface design - Only an in-memory test implementation exists (
InMemorySessionStore). Production will need Redis, database, or other persistent storage. Review the interface to ensure it supports your planned storage backend.Validate security implementations - Review
SessionEncryption(AES-GCM),SessionIdGenerator(SecureRandom), andSessionHijackingPrevention(IP/User-Agent binding) to ensure they meet your security standards. Note that key management strategy for encryption is not yet defined.Test concurrent session limits - The
ConcurrentSessionManagerenforces configurable session limits per user. Verify the logic for terminating oldest sessions when limits are exceeded aligns with your requirements.Test Plan
Since this is standalone code without web integration:
Review the unit tests - All 53 tests pass. Review
SessionTest,SessionManagerTest,SessionSecurityTest,ReauthenticationTest, andSessionLifecycleTestto understand the behavior.Verify compilation - Run
mvn compileto ensure the code compiles successfully (already verified in this PR).Check for integration points - Review how this will integrate with Part 1.1 (Core Framework) when web capabilities are added. The design uses interfaces (
SessionStore) and dependency injection to support future integration.Notes
PrivilegeChangeDetectorare placeholders for Part 1.2 integration.Session URL: https://app.devin.ai/sessions/5acc9a7365db477cabc41d2468043917
Requested by: Jake Cosme (jake@cognition.ai) / @jakexcosme