Security best practices
DNotifier handles realtime messaging, AI, and stored knowledge-base content. Follow these practices to protect credentials, user data, and your production environment.
Protect your app secret
Your secret paired with appId authenticates full access to your DNotifier application.
Store secrets in environment variables or a secret manager
Commit secrets to git
Rotate secrets immediately after a leak
Log secrets in application logs
Use different apps/secrets for dev and production
Share one secret across all environments
Restrict dashboard access to trusted team members
Paste secrets in support tickets or chat
Browser and mobile clients
Backend proxy
Browser calls your API; server holds the secret and talks to DNotifier
Post-login connection
User authenticates with your auth; server returns only what the client needs
HTTP-only AI
AI and RAG run on your server with transport: "http"
The JavaScript and Flutter Web guides describe dev-only import.meta.env / --dart-define patterns — acceptable for local development, not for public production apps.
→ Browser platform guide · Flutter platform guide
User ID and routing
DNotifier uses directed messaging — senderId sends to explicit receiverId or receiverIds.
Treat
userIdas a routing key, not proof of identity by itselfValidate on your backend that the authenticated user may act as a given
senderIdDo not let clients pick arbitrary
receiverIdvalues without authorization checks
Message payload safety
Incoming messages are untrusted input from other users or services.
XSS
Sanitize HTML before rendering chat content
Injection
Validate JSON shape; do not eval payload data
Phishing links
Warn users or allowlist link domains in UI
Large payloads
Respect messageSizeLimit; handle chunk reassembly safely
Transport security
WebSocket
wss:// to api.dnotifier.com (default SDK endpoints)
HTTP auth / RPC
https:// only
Custom url
Never use plain ws:// or http:// in production
AI and knowledge base
PII in prompts
Minimize personal data sent to sendAI; follow your privacy policy
RAG documents
Index only content you are allowed to store and retrieve
Session history
fetchAIHistory and fetchChatHistory return sensitive data — gate access in your app
Delete APIs
Use deleteAIHistoryMessage and deleteChatHistoryMessage to honor user deletion requests
→ AI overview · Chat history
Workflow observability
When observability: true, step inputs and outputs may appear in the DNotifier workflow dashboard.
Avoid logging secrets, tokens, or raw PII in workflow step
input/outputUse
labelfields for human-readable step names, not sensitive content
Dependency hygiene
Incident response
If a secret is exposed:
Rotate the secret in app.dnotifier.com immediately
Redeploy all services using the old secret
Review dashboard logs for unusual AI or message activity
Document the incident and update access controls
→ Support & links
Compliance checklist (summary)
Secrets
Environment / vault only
Client apps
No embedded production secrets
Messages
Validate and sanitize before display
TLS
Default production endpoints only
Access control
Backend validates sender/receiver identity
Data deletion
Use SDK delete APIs where required
Related guides
Last updated