Skip to content

Commit

Permalink
feat(proto): Added audit.proto, incident.proto, documentation.proto, …
Browse files Browse the repository at this point in the history
…and workflow.proto with enhanced definitions and architecture alignment

audit.proto: Centralized audit log aggregation, regulatory compliance logs, and integrity tracking with AuditEntry, AuditTrail, and AuditConfig messages.
incident.proto: Incident tracking, escalation management, and response workflows with IncidentReport, IncidentResponsePlan, and IncidentEscalation.
documentation.proto: Version-controlled documentation, operational runbooks, and dependency management with Document and Runbook messages.
workflow.proto: Cross-domain workflow orchestration and execution with WorkflowDefinition and Task structures.
  • Loading branch information
sergism77 committed Jan 7, 2025
1 parent f8d5396 commit 319ebfb
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 0 deletions.
71 changes: 71 additions & 0 deletions src/seigr_protocol/audit.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
syntax = "proto3";

package seigr.audit;

import "common.proto"; // For PriorityLevel and OperationalStatus

// ===========================
// ENUMS
// ===========================

/**
* Enum defining the audit event severity.
*/
enum AuditSeverity {
AUDIT_SEVERITY_UNDEFINED = 0;
AUDIT_INFO = 1; // Informational audit event.
AUDIT_WARNING = 2; // Warning-level audit event.
AUDIT_CRITICAL = 3; // Critical or security-related audit event.
}

/**
* Enum defining the action types tracked by audit.
*/
enum AuditActionType {
AUDIT_ACTION_UNDEFINED = 0;
AUDIT_ACTION_CREATE = 1; // Creation action.
AUDIT_ACTION_UPDATE = 2; // Update action.
AUDIT_ACTION_DELETE = 3; // Deletion action.
AUDIT_ACTION_ACCESS = 4; // Resource access.
AUDIT_ACTION_EXPORT = 5; // Data export.
AUDIT_ACTION_IMPORT = 6; // Data import.
}

// ===========================
// CORE AUDIT MESSAGES
// ===========================

/**
* Represents a single audit log entry.
*/
message AuditEntry {
string audit_id = 1; // Unique identifier for the audit entry.
string user_id = 2; // User or system initiating the action.
string resource_id = 3; // Target resource identifier.
AuditActionType action = 4; // Type of action performed.
AuditSeverity severity = 5; // Severity level of the audit entry.
string timestamp = 6; // ISO8601 timestamp of the event.
string outcome = 7; // Outcome of the action (e.g., SUCCESS, FAILURE).
map<string, string> metadata = 8; // Additional metadata (e.g., IP address, device ID).
string hash = 9; // Hash for tamper-proof verification.
}

/**
* Represents a collection of aggregated audit logs.
*/
message AuditTrail {
string trail_id = 1; // Unique identifier for the audit trail.
repeated AuditEntry entries = 2; // List of audit entries.
map<string, string> query_metadata = 3; // Metadata for query filters (e.g., date range, user).
string generated_at = 4; // Timestamp of query generation.
}

/**
* Global configuration for audit logging.
*/
message AuditConfig {
int32 retention_days = 1; // Number of days to retain logs.
string logging_level = 2; // Logging level (e.g., DEBUG, ERROR).
bool enable_hash_verification = 3; // Enable tamper-proof hashing.
map<string, string> metadata = 4; // Additional policy metadata.
}
34 changes: 34 additions & 0 deletions src/seigr_protocol/documentation.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
syntax = "proto3";

package seigr;

// Message representing an individual document
message Document {
string document_id = 1; // Unique identifier for the document
string title = 2; // Document title
string version = 3; // Current version of the document
string content = 4; // Document content
string author = 5; // Author of the document
string created_at = 6; // Creation timestamp
map<string, string> metadata = 7; // Additional metadata (e.g., tags, categories)
}

// Message for managing knowledge base entries
message KnowledgeBaseEntry {
string entry_id = 1; // Unique identifier for the knowledge base entry
string question = 2; // Frequently asked question or topic
string answer = 3; // Corresponding answer or explanation
string created_by = 4; // ID of the creator
string created_at = 5; // Timestamp of entry creation
map<string, string> entry_metadata = 6; // Metadata for classification
}

// Message for defining automated runbooks
message Runbook {
string runbook_id = 1; // Unique identifier for the runbook
string title = 2; // Title of the runbook
repeated string steps = 3; // List of automated steps
string created_by = 4; // ID of the creator
string created_at = 5; // Timestamp of runbook creation
map<string, string> runbook_metadata = 6; // Metadata for tracking context
}
73 changes: 73 additions & 0 deletions src/seigr_protocol/incident.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
syntax = "proto3";

package seigr.incident;

import "common.proto"; // For PriorityLevel

// ===========================
// ENUMS
// ===========================

/**
* Enum defining the severity of incidents.
*/
enum IncidentSeverity {
INCIDENT_SEVERITY_UNDEFINED = 0;
INCIDENT_LOW = 1;
INCIDENT_MEDIUM = 2;
INCIDENT_HIGH = 3;
INCIDENT_CRITICAL = 4;
}

/**
* Enum defining the current status of an incident.
*/
enum IncidentStatus {
INCIDENT_STATUS_UNDEFINED = 0;
INCIDENT_OPEN = 1;
INCIDENT_IN_PROGRESS = 2;
INCIDENT_RESOLVED = 3;
INCIDENT_ESCALATED = 4;
INCIDENT_CLOSED = 5;
}

// ===========================
// CORE INCIDENT MESSAGES
// ===========================

/**
* Tracks an individual incident report.
*/
message IncidentReport {
string incident_id = 1; // Unique incident identifier.
string title = 2; // Incident title.
string description = 3; // Detailed incident description.
IncidentSeverity severity = 4; // Severity of the incident.
IncidentStatus status = 5; // Current status of the incident.
string reported_by = 6; // ID of the user or system reporting.
string reported_at = 7; // Timestamp of report.
map<string, string> metadata = 8; // Additional context.
repeated string stakeholders = 9; // List of stakeholders involved.
}

/**
* Defines the response plan for incidents.
*/
message IncidentResponsePlan {
string plan_id = 1; // Plan identifier.
string incident_id = 2; // Associated incident ID.
repeated string steps = 3; // Defined resolution steps.
map<string, string> roles = 4; // Assigned roles and responsibilities.
}

/**
* Represents incident escalation rules.
*/
message IncidentEscalation {
string escalation_id = 1; // Escalation rule identifier.
string incident_id = 2; // Associated incident ID.
string escalation_trigger = 3; // Trigger condition (e.g., time elapsed).
string escalation_target = 4; // Target team or individual.
string timestamp = 5; // Time of escalation.
map<string, string> escalation_metadata = 6; // Context metadata.
}
28 changes: 28 additions & 0 deletions src/seigr_protocol/notification.proto
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,31 @@ message NotificationSchedule {
int32 adaptive_grace_period = 9; // Dynamic grace period adjustment.
bool user_activity_dependent = 10; // Only deliver during active hours.
}

// Message for individual notification events
message NotificationEvent {
string event_id = 1; // Unique identifier for the notification event
string severity = 2; // Severity level (e.g., "INFO", "WARN", "CRITICAL")
string message = 3; // Notification message content
repeated string target_users = 4; // IDs of users or groups to notify
string timestamp = 5; // Timestamp of the notification event
map<string, string> metadata = 6; // Additional metadata (e.g., category, tags)
}

// Message for user-specific notification settings
message UserNotificationSettings {
string user_id = 1; // ID of the user for these settings
repeated string preferred_channels = 2; // Channels (e.g., "EMAIL", "SMS", "WEB")
string notification_frequency = 3; // Frequency of notifications (e.g., "INSTANT", "DAILY")
map<string, string> preferences_metadata = 4; // Additional settings metadata
}

// Message for critical system alerts
message SystemAlert {
string alert_id = 1; // Unique identifier for the alert
string alert_type = 2; // Type of system alert (e.g., "FAILURE", "DEGRADATION")
string severity = 3; // Severity of the alert (e.g., "HIGH", "CRITICAL")
string message = 4; // Alert message content
string triggered_at = 5; // Timestamp when the alert was triggered
map<string, string> alert_metadata = 6; // Metadata for additional alert context
}
29 changes: 29 additions & 0 deletions src/seigr_protocol/workflow.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
syntax = "proto3";

package seigr;

// Message defining a workflow
message WorkflowDefinition {
string workflow_id = 1; // Unique identifier for the workflow
string name = 2; // Name of the workflow
repeated Task tasks = 3; // List of tasks in the workflow
map<string, string> dependencies = 4; // Task dependencies
map<string, string> policies = 5; // Execution policies
}

// Message for tracking workflow execution
message WorkflowExecution {
string execution_id = 1; // Unique identifier for the execution
string workflow_id = 2; // ID of the workflow being executed
string status = 3; // Execution status (e.g., "RUNNING", "COMPLETED")
string started_at = 4; // Timestamp when execution started
map<string, string> execution_logs = 5; // Logs for tracking execution steps
}

// Message representing individual tasks in a workflow
message Task {
string task_id = 1; // Unique identifier for the task
string action = 2; // Description of the task action
map<string, string> inputs = 3; // Input parameters for the task
map<string, string> outputs = 4; // Output results of the task
}

0 comments on commit 319ebfb

Please sign in to comment.