Skip to content

feat(aws/sns): implement certificate caching and optimize signature verification#4896

Open
edsonvalher wants to merge 1 commit into
superplanehq:mainfrom
edsonvalher:feat/sns-cache
Open

feat(aws/sns): implement certificate caching and optimize signature verification#4896
edsonvalher wants to merge 1 commit into
superplanehq:mainfrom
edsonvalher:feat/sns-cache

Conversation

@edsonvalher
Copy link
Copy Markdown

Description

This PR optimizes the AWS SNS integration by implementing a thread-safe, in-memory cache for signing certificates. Previously, certificates were fetched via HTTP for every single incoming message, introducing latency and redundant network overhead.

Key Improvements

  • Performance: Reduced verification latency from ~100ms to <1ms through caching.
  • Architecture: Implemented the Double-Checked Locking pattern using sync.RWMutex for optimal thread safety and high-throughput performance.
  • Quality: Identified and fixed legacy RSA verification bugs in the existing test suite related to SubscriptionConfirmation messages.
  • TDD: Added 100% unit test coverage for the new caching logic.

Verified with Go 1.26.2. All tests PASS. A detailed architectural README has been added to the component directory.

…erification

Signed-off-by: Edson Valenzuela <edsonvalher@gmail.com>
@superplanehq-integration
Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

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