generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Current Behavior
The ClockSkew value in appsettings.json under JwtBearerOptions.TokenValidationParameters is set as an integer (60000):
"TokenValidationParameters": {
"ClockSkew": 60000
}
Ref:
| "ClockSkew": 600000 |
This value is incorrectly parsed by .NET's configuration binding. When binding to TimeSpan, a plain integer is interpreted as days, resulting in an extremely large clock skew (~164 years) instead of the intended 60 seconds or 1 minute.
Expected Behavior
ClockSkew should be configured as a valid TimeSpan string format that .NET can correctly parse:
"TokenValidationParameters": {
"ClockSkew": "00:01:00"
}
This ensures the clock skew is properly set to 1 minute, allowing for reasonable tolerance when validating token expiration times.
Steps To Reproduce
- Create a token using keycloak token API
- Wait for token expiry + 10-15 mins
- Make an API call with an expired token
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels