Skip to content

add scheduled task to disable expired api keys#891

Open
MorganaFuture wants to merge 2 commits into
flamingo-stack:mainfrom
MorganaFuture:MorganaFuture/fix/api-key-expiration-scheduler
Open

add scheduled task to disable expired api keys#891
MorganaFuture wants to merge 2 commits into
flamingo-stack:mainfrom
MorganaFuture:MorganaFuture/fix/api-key-expiration-scheduler

Conversation

@MorganaFuture

Copy link
Copy Markdown

Description

Expired API keys stayed enabled=true in the DB — gateway rejected them at request time, but stored state was stale.

Improvements

  • Added ApiKeyExpirationScheduler - hourly sweep with ShedLock, configurable via openframe.api-key-expiration.*
  • Added ApiKeyExpirationService that disables expired keys via existing findExpiredKeys() query
  • Removed dead TODO method from ApiKeyService
  • Unit tests for both the bug and the fix

MorganaFuture and others added 2 commits April 29, 2026 16:44
expired keys were staying enabled=true in the db even after expiry.
gateway rejected them correctly at request time, but the stored state
was stale. added hourly sweep in management-service-core with shedlock.
@MorganaFuture

Copy link
Copy Markdown
Author

@ivan-flamingo could you please take a look?

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.

1 participant