Skip to content

perf(cloud): reuse organization API key validation - #1584

Draft
maschwenk wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
maschwenk:fix/faster-integration-catalog
Draft

perf(cloud): reuse organization API key validation#1584
maschwenk wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
maschwenk:fix/faster-integration-catalog

Conversation

@maschwenk

Copy link
Copy Markdown
Contributor

Summary

  • reuse successful WorkOS validation for organization-owned API keys for 10 seconds
  • hash bearer credentials before using them as in-memory cache keys and coalesce concurrent validation requests
  • leave user-owned keys, invalid keys, and WorkOS failures uncached
  • invalidate cached validation immediately when an organization key is revoked through Executor

A key revoked outside Executor can remain accepted by one active isolate for at most 10 seconds.

Validation

  • bun run bootstrap
  • focused cloud authentication tests (24 passed)
  • organization-key cloud scenario covering mint, authentication, and immediate rejection after revoke
  • bun run format and bun run format:check
  • bun run lint
  • bun run typecheck (44 tasks passed)

bun run test passed the affected cloud coverage. The repository-wide run also reproduced existing failures in the organization-key revoke unit fixture, which omits the required organization selector, and an unrelated self-host timeout.

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