You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: SECURITY.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,9 +79,12 @@ Never commit `.env` files. Use environment-specific secret management (Vault, AW
79
79
80
80
### API Security
81
81
82
-
-**Rate limiting** on escrow, shipment, and auth endpoints
82
+
- All API access (except public webhooks and SEP-10 challenge generation) requires a valid JWT.
83
+
- JWTs are short-lived (1 hour) and signed using HMAC (HS256) with a secret rotation policy.
84
+
-**Refresh Token Rotation**: Refresh tokens are issued alongside access tokens. Upon refresh, the old token is revoked and a new pair is issued. Reuse of a revoked refresh token immediately invalidates the entire token family to prevent hijacking.
85
+
-**Replay Attack Prevention**: SEP-10 challenge transactions generate a cryptographically secure nonce stored in the database. Challenges are strictly single-use and expire within 15 minutes. Replay attempts with a previously used challenge transaction are rejected.
86
+
-**Rate Limiting (Throttler)**: Public endpoints are protected against abuse and DDoS attacks. The SEP-10 challenge endpoint is limited to 10 requests per minute per IP. The Escrow query endpoints are limited to 60 requests per minute per IP.
83
87
-**Input validation** via `class-validator` and Stellar SDK address checks
84
-
-**SEP-10 authentication** with JWT (1-hour expiry) and challenge replay protection
85
88
-**Security headers** via middleware: `X-Content-Type-Options`, `X-Frame-Options`, `X-XSS-Protection`, `Referrer-Policy`
0 commit comments