Server security and API testing
How we protect server files, separate API traffic, and test new endpoints.
Key Engineering Milestones
1. Protecting server files
Server code, internal instructions, and database credentials must stay private.
The access checks in server.js work in several stages:
- Percent-Encoding Normalization: Neutralizes obfuscated traversal attacks like
%2e%2e,%2f, and null bytes (\0). - Path Traversal Elimination: Automatically intercepts relative path attempts (
..,../,..\) with a strict403 Forbiddenresponse. - Protected File Blacklist: Requests targeting
system_prompt.txt,schema.sql,server.js,package.json, or.envare blocked immediately. - Memory-First Ingestion: Directives are ingested into memory at boot, requiring zero public HTTP endpoint exposure.
// Zero-Trust Security Middleware
app.use((req, res, next) => {
const urlPart = (req.originalUrl || req.url || '').split('?')[0].split('#')[0];
const rawPath = decodeURIComponent(urlPart).toLowerCase().trim().replace(/\0/g, '');
const normalized = path.normalize(rawPath).replace(/\\/g, '/');
// Block path traversal and dotfiles
if (rawPath.includes('..') || rawPath.includes('/.') || rawPath.startsWith('.')) {
return res.status(403).json({ error: "Forbidden: Not Authorized." });
}
next();
});
2. The API gateway
To keep responses fast and separate different kinds of requests, we launched https://api.microbix.in as our official API gateway domain.
Research papers, engineering news, and documentation.
Browser-native OS, team war-rooms, and real-time voice.
Programmatic REST endpoints and developer SDK routing.
3. Testing the API
The API is undergoing developer testing. Unreleased endpoints return a structured JSON response during this phase:
{
"error": {
"message": "Microbix and Aether APIs are currently in active testing, and are not available right now. Public access will be available soon.",
"type": "api_preview_unavailable",
"code": "service_in_testing",
"status": 503,
"documentation": "https://microbix.in/docs/api-reference",
"console": "https://console.microbix.in",
"system_status": "https://microbix.in/status"
}
}
Developers can explore full schemas in the API Reference Documentation and configure keys via the Developer Console.
4. Handling missing pages
Missing pages show a clear error message and a route back to the site.