Security best practices for partners
Applies to ServerBike Reseller for WHMCS 0.1.8 and ServerBike Reseller Public API 1.1.1.
- Keep the API secret on your server. Store it only in your server-side credential store. Never put it in browser JavaScript, a mobile app, a response sent to your customer portal, source control, analytics, logs or tickets. Use TLS 1.2 or newer with certificate and hostname validation, do not follow redirects and do not use a proxy that rewrites requests.
- Check every customer request yourself. Run your own user sign-in, check that each customer owns the service they act on, protect forms against CSRF and control administrator access. ServerBike authenticates you as the reseller, not your individual customers. A service UUID identifies a service; it does not grant access to it.
- Register your real outbound IP addresses. Register every public IP address your backend and scheduled jobs connect from, between 1 and 16 exact addresses. Before you move servers, arrange the change with ServerBike, confirm the new address works and then ask us to remove the old one. Never request access for whole network ranges.
- Sign every attempt correctly. Keep your server clock accurate. Use a new nonce, timestamp and signature for each attempt, and keep the original operation UUID for the same order or action. Never retry an unclear purchase or renewal under a different UUID. Store the exact request body securely; requests that contain passwords need special protection and must never be logged.
- Protect the WHMCS keyring. Keep it outside the web root, owned by the same non-root user that runs the website and cron. Keep private, encrypted backups of the matching module database and keyring journal. Never copy keys between installations, and follow the official keyring procedure for rotation and recovery.
- Rotate credentials safely. Rotate API credentials through ServerBike, confirm the new credential works before the old one is revoked, and ask for immediate revocation if a credential may be compromised. ServerBike cannot show you a secret again after it is issued. Rotating your local keyring key is separate from rotating your API credential.
- Handle one-time passwords and console links with care. Show initial passwords only to the customer who owns the service, and never store them in plain text. Treat temporary console links as secrets: check that the customer owns the service before you request one, and never log it. Never give customers access to any infrastructure administration system.
- Stay on supported versions. Use a supported module version and check the SHA-256 checksum of every official archive. Protect your backups, keep WHMCS and your server up to date and contact ServerBike before moving to a WHMCS or PHP version that is not listed as supported.
- Close your account cleanly. When you leave the program, reconcile pending operations, settle what you owe and ask ServerBike to revoke your access. Removing the module from WHMCS does not terminate services or settle outstanding wholesale charges.