API Security
API Security
API Security
Avoid ‘Basic Authentication’, use standard (e.g. JWT) Use good `JWT Secret` to make brute force attacks di!cult
Do not reinvent the wheel in authentication mechanisms. Do not extract the algorithm from the header, use backend
Use `Max Retry’ and jail features in Login. Make token expiration (TTL, RTTL) as short as possible
Use encryption on all sensitive data. Avoid storing sensitive data in JWT payload
Keep the payload small to reduce the size of the JWT token
Validate `content-type` on request header Prefer using UUID over auto-increment IDs
Validate user input to avoid common vulnerabilities Disable entity parsing if you are parsing XML to avoid XXE attacks
Use standard Authorization header for sensitive data Disable entity expansion if using XML, YML or any other language
Use only server-side encryption
Use CDN for file uploads
Use an API Gateway for caching, Rate Limit policies etc Avoid HTTP blocking if you are using huge amount of data
Monitoring
More Resources
Use centralized logins for all services and components.