Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cap max session time to a safe value. #144

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

pavelhoral
Copy link
Member

@pavelhoral pavelhoral commented Jul 26, 2023

This change fixes issues with immediate expiration of agent sessions created with com.iplanet.am.session.agentSessionIdleTime system property set to a non-zero value.

The original issue was that when the agentSessionIdleTime was set, then max session time was set to Long.MAX_VALUE, which caused value overflow in getMaxSessionExpirationTime and the session was immediately marked as expired.

The issue led to a quite strange behavior of not including tokenId field in REST /authentication response:

{
    "message": "Authentication Successful",
    "successUrl": "/auth/console",
    "realm": "/"
}

This change fixes issues with immediate expiration of agent sessions created with
`com.iplanet.am.session.agentSessionIdleTime` system property set to a non-zero value.
@pavelhoral pavelhoral requested a review from karelmaxa July 26, 2023 17:29
Copy link
Member

@karelmaxa karelmaxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@karelmaxa karelmaxa merged commit c040188 into WrenSecurity:main Jul 28, 2023
@karelmaxa karelmaxa deleted the fix-agent-session-overflow branch July 28, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants