-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Epic 5: Licensing Infrastructure
User Story
As a server operator,
I want a grace period after license expiry before degradation,
So that a billing hiccup or credit card issue does not immediately lock me out of paid features.
Acceptance Criteria
Given a valid JWT that expired less than 7 days ago
When the license is evaluated at startup
Then full tier access is granted
And a WARNING is logged at every startup: "License expired {N} days ago. Renew at https://portal.softclient4es.com"
Given a valid JWT that expired between 7 and 14 days ago
When the license is evaluated
Then full tier access is granted
And a WARNING is logged at every request: "License expired {N} days ago. Service will degrade to Community in {14-N} days."
Given a valid JWT that expired more than 14 days ago
When the license is evaluated
Then the system attempts API key fetch (if configured), then disk cache
And if no valid license is found, it degrades to Community tier
And an ERROR is logged: "License expired beyond grace period. Running in Community mode."
Given a Community tier degradation
When the operator renews their license (new JWT via API key fetch or manual config)
Then full tier access is restored immediately on next refresh or restart
And an INFO log: "License restored to {tier}"
Given grace period is configurable via softclient4es.license.grace-period
When set to 14d (default)
Then the grace period is 14 days
And custom values (e.g., 7d, 30d) are respected
Dependencies
- Disk Cache & Offline Fallback (FR26)
Requirements
- FR27: Grace period (14 days) after JWT expiry before degradation to Community
- FR33: License lifecycle management — purchase, activation, renewal, expiry, grace period, downgrade