@ithena-one/mcp-governance
Version:
Governance layer (Identity, RBAC, Credentials, Audit, Logging, Tracing) for Model Context Protocol (MCP) servers.
36 lines • 931 B
JavaScript
/**
* An AuditLogStore that does nothing. Used as the default if no store is provided.
*/
export class NoOpAuditLogStore {
async initialize() {
// Do nothing
}
async log(_record) {
// Do nothing
}
async shutdown() {
// Do nothing
}
}
/**
* An AuditLogStore that logs audit records as JSON to the console.
* Suitable for development and debugging.
*/
export class ConsoleAuditLogStore {
async initialize() {
console.log("ConsoleAuditLogStore initialized");
}
async log(record) {
try {
console.log(JSON.stringify(record));
}
catch (error) {
console.error("Failed to serialize or log audit record:", error, record);
}
}
async shutdown() {
console.log("ConsoleAuditLogStore shutting down");
}
}
export const defaultAuditStore = new NoOpAuditLogStore();
//# sourceMappingURL=audit.js.map