Security & Privacy
Security is a top priority when managing feature flags. RocketFlag provides tools to help you secure your implementation and protect your users’ privacy.
1. User Privacy & Cohorts
Section titled “1. User Privacy & Cohorts”When using Cohorts for targeting, you must provide a cohort identifier to the API.
Avoid PII
Section titled “Avoid PII”To protect your users’ privacy, avoid sending Personally Identifiable Information (PII) like raw email addresses or real names to the API if possible.
Recommended Pattern: Hashing
Section titled “Recommended Pattern: Hashing”Instead of sending user@example.com, send a hashed version of the ID or a non-sensitive internal database UUID:
// Database ID (Safe)const cohortId = user.id; // e.g., "507f1f77bcf86cd799439011"
// Evaluated via SDKconst flag = await rocketflag.getFlag(flagId, { cohort: cohortId });2. API Security: Evaluation vs. Management
Section titled “2. API Security: Evaluation vs. Management”RocketFlag uses two distinct APIs to ensure security:
- Public Evaluation API: Used by your applications to check flag states. Flags are secured and addressed via Flag IDs. It is safe to use in frontend and client-side code.
- Management API: Token-authenticated
/api/v1endpoints for your scripts and CI (API tokens, Teams and Enterprise plans). The console uses separate private endpoints. It can change production flags, so keep tokens in server-side code and CI secrets, and never call it from untrusted client-side environments.
3. Environment Isolation
Section titled “3. Environment Isolation”Use Multi-Environment Projects to ensure that changes in your dev environment can never accidentally impact your production users. Each environment is treated as a separate silo by the RocketFlag evaluation engine.
4. Data Cleanup & Token Revocation
Section titled “4. Data Cleanup & Token Revocation”- Immediate token revocation: Deleting a project or organisation immediately revokes all associated API tokens and purges their denial history, preventing unauthorized access from orphaned credentials.
- Account deletion anonymisation: When a user account is deleted, personal data (feedback, snapshots, pending invites) is permanently removed, while organisation audit trails and team-created API tokens are anonymised to protect individual privacy without disrupting ongoing team operations.