Describe the bug
When CEDARLING_TOKEN_CACHE_MAX_TTL = 0, the token cache logs the warning "could not set token to token cache: ttl too long" for every token that has a non-zero exp claim. The documented behaviour states that setting this value to 0 should disable the TTL cap and use the token's exp claim as the entry TTL. Instead, SparkV's internal max_ttl is set to 0 seconds, which causes it to reject any entry with a positive TTL.
To Reproduce
- Set CEDARLING_TOKEN_CACHE_MAX_TTL = 0 in bootstrap config.
- Present an access token with a valid exp claim (e.g. 1 hour lifetime).
- Observe the warning "could not set token to token cache: ttl too long" in logs.
Expected behavior
- Setting CEDARLING_TOKEN_CACHE_MAX_TTL = 0 should either disable the cache entirely to avoid unbounded growth and misleading warnings. The docs should also updated to follow this behavior.
Describe the bug
When CEDARLING_TOKEN_CACHE_MAX_TTL = 0, the token cache logs the warning "could not set token to token cache: ttl too long" for every token that has a non-zero exp claim. The documented behaviour states that setting this value to 0 should disable the TTL cap and use the token's exp claim as the entry TTL. Instead, SparkV's internal max_ttl is set to 0 seconds, which causes it to reject any entry with a positive TTL.
To Reproduce
Expected behavior