Summary
Write operations (POST/PUT/DELETE campaigns) are protected by API key auth, but there is no way for a wallet-owning campaign creator to authenticate using their Stellar key pair. On mainnet, campaign creation should be permissioned by wallet signature — not a shared API key — so only the campaign operator (who controls the admin key for the linked contract) can manage their campaign.
Problem
Current auth model:
- API key is a shared secret, not tied to any individual identity
- No way to verify that the caller owns the admin key of the referenced campaign contract
- A leaked API key grants full write access to all campaigns
Acceptance Criteria
References
backend/src/middleware/apiKeyAuth.js
backend/src/index.js — route registration
frontend/src/stellar.js — wallet signing
Summary
Write operations (POST/PUT/DELETE campaigns) are protected by API key auth, but there is no way for a wallet-owning campaign creator to authenticate using their Stellar key pair. On mainnet, campaign creation should be permissioned by wallet signature — not a shared API key — so only the campaign operator (who controls the admin key for the linked contract) can manage their campaign.
Problem
Current auth model:
Acceptance Criteria
GET /api/v1/auth/challengereturns a time-limited nonce (60s TTL) for a given wallet addressPOST /api/v1/auth/verifyvalidates the signature against the public key, returns a short-lived JWT (15 min) or session token@stellar/stellar-sdk), and token issuancebackend/openapi.yamlandbackend/README.mdReferences
backend/src/middleware/apiKeyAuth.jsbackend/src/index.js— route registrationfrontend/src/stellar.js— wallet signing