Adds request signing and key publishing for downstream verification #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements request signing for OpenRTB bid requests with automatic key rotation
Related Issues
New Endpoints
• GET /.well-known/jwks.json - Returns current public keys in JWKS format for signature verification
• POST /admin/rotate-keys - Triggers key rotation (generates new keypair, updates stores, deprecates old key)
• POST /admin/deactivate-key/:kid - Deactivates a specific key by its Key ID
• POST /admin/verify-signature - Verifies request signatures for testing/debugging
Request Signing
• All OpenRTB bid requests now include a signature in ext.trusted_server.signature and ext.trusted_server.kid
• Uses Ed25519
• Signs the request ID (bid_request.id) to ensure request authenticity
Key Rotation
Storage Model:
• Config Store (jwks_store): Stores current-kid (active key ID) and jwks (public JWKS document)
• Secret Store (signing_keys): Stores private keys indexed by KID (e.g., kid_abc123...)
Rotation Process:
Todos