feat(enterprise): add Privacy Policy, Data Retention schedule, Sliding-Window Rate Limiting, Optional Auth Layer, Speeding A brand icon, and GitHub footer link

This commit is contained in:
root
2026-10-22 01:21:50 +00:00
parent 55795a3e02
commit be213678f4
16 changed files with 904 additions and 25 deletions
+34
View File
@@ -0,0 +1,34 @@
import { Request, Response, NextFunction } from "express";
export interface AuraAuthContext {
isByok: boolean;
isMasterAuthorized: boolean;
callerToken?: string;
}
declare global {
namespace Express {
interface Request {
auraAuth?: AuraAuthContext;
}
}
}
/**
* Check if the inbound request has merchant custom carrier credentials (BYOK - Bring Your Own Keys)
*/
export declare function hasByokCredentials(req: Request): boolean;
/**
* Extract bearer token or API key from request
*/
export declare function extractAuthToken(req: Request): string | undefined;
/**
* Optional Auth Evaluator:
* Public endpoints, discovery, and BYOK requests are permitted.
* If server has AURA_API_KEY set, master-account mutating actions require authentication.
*/
export declare function optionalAuthMiddleware(req: Request, res: Response, next: NextFunction): void;
/**
* Helper to verify whether an action requires master auth and whether it is granted
*/
export declare function isActionPermitted(req: Request, toolName: string): {
permitted: boolean;
reason?: string;
};