# Kafka Significant Events > Available since: version 7.0.1 ## Overview The Kafka Significant Events are a centralized event system in the MetalSoft platform that emit structured events to Kafka for external integration. These events capture critical infrastructure changes and security actions across the platform and allow 3rd party developers and clients to develop integrations with other enterprise systems and automation solutions. ## Architecture ### Components 1. **Event Categories** - **Server Management**: Server lifecycle events (creation, updates, deletion, registration) - **Security**: User and authentication events (login, credential changes, access modifications) - **Network Device Management**: Network infrastructure events (device registration, fabric assignments) - **Instance Management**: Instance and DNS lifecycle events (updates, deletions) ### Event Structure Each significant event follows the CloudEvent specification and contains the following structure: ```json { "id": "unique-event-identifier", "time": "2025-01-01T12:00:00.000Z", "type": "dot.separated.event.type", "source": "https://metalsoft.io/microservice-name", "specversion": "1.0", "datacontenttype": "application/json", "data": { // Event-specific payload with string values } } ``` ## Event Categories ### Server Management Events Events related to server lifecycle management. | Event Type | Description | Data Structure | |------------|-------------|----------------| | `server.deleted` | Server permanently deleted | `{"serverId": "string", "serverUUID": "string", "serverClass": "string", "serverStatus": "string"}` | | `server.updated` | Server configuration updated | `{"serverId": "string", "userId": "string", "changes": {"previousState": {}, "currentState": {}}}` | | `server.credentials.updated` | Server credentials changed | `{"serverId": "string", "userId": "string", "serverManagementAddress": "string"}` | | `server.registered` | Server successfully registered | `{"serverId": "string", "serverStatus": "string", "serverTypeId": "string", "siteId": "string", "userId": "string"}` | | `server.registration.initiated` | Server registration process started | `{"serverId": "string", "managementAddress": "string", "siteId": "string"}` | | `server.reregistration.initiated` | Server re-registration started | `{"serverId": "string", "managementAddress": "string", "siteId": "string"}` | | `server.production.registration.initiated` | Production server registration started | `{"serverId": "string", "managementAddress": "string", "siteId": "string"}` | | `server.decommissioned` | Server decommissioned | `{"serverId": "string", "serverUUID": "string", "serverClass": "string", "serverStatus": "string", "serverTypeId": "string"}` | | `server.production.registered` | Server registered for production use | `{"serverId": "string", "serverStatus": "string", "serverTypeId": "string", "siteId": "string", "userId": "string"}` | ### Security Events User and authentication-related events from the auth microservice. | Event Type | Description | Data Structure | |------------|-------------|----------------| | `user.created` | New user account created | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.credentials.changed` | User password/credentials updated | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.suspended` | User account suspended | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.unsuspended` | User account reactivated | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.password.reset.requested` | Password reset initiated | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.email.updated` | User email address changed | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.email.verified` | User email address verified | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.api.key.regenerated` | User API key regenerated | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.ssh.key.created` | SSH key added to user account | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.ssh.key.deleted` | SSH key removed from user account | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.delegate.removed` | User delegate access removed | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.delegate.added` | User delegate access granted | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.unarchived` | User account restored from archive | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.archived` | User account archived | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.2fa.enabled` | Two-factor authentication enabled | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.2fa.disabled` | Two-factor authentication disabled | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | | `user.access.level.set` | User access level changed | `{"userId": "string", "userEmail": "string", "loggedInUserId": "string", "loggedInUserEmail": "string", "message": "string"}` | ### Network Device Management Events Network infrastructure events from the inventory microservice. | Event Type | Description | Data Structure | |------------|-------------|----------------| | `network.device.created` | New network device added | `{"networkDeviceId": "string", "managementAddress": "string", "identifierString": "string", "driver": "string", "position": "string", "siteId": "string"}` | | `network.device.deleted` | Network device permanently removed | `{"networkDeviceId": "string", "position": "string", "siteId": "string", "identifierString": "string", "userIdAuthenticated": "string"}` | | `network.device.registered` | Network device successfully registered | `{"networkDeviceId": "string", "managementAddress": "string", "identifierString": "string", "driver": "string", "position": "string", "siteId": "string"}` | | `network.device.registration.initiated` | Network device registration started | `{"networkDeviceId": "string", "managementAddress": "string", "serialNumber": "string", "chassisIdentifier": "string", "managementMacAddress": "string"}` | | `network.device.archived` | Network device archived | `{"networkDeviceId": "string", "userIdAuthenticated": "string"}` | | `network.device.assigned.to.fabric` | Device assigned to network fabric | `{"fabricId": "string", "networkDeviceIds": "string[]", "fabricName": "string"}` | | `network.device.removed.from.fabric` | Device removed from network fabric | `{"fabricId": "string", "networkDeviceIds": "string[]", "fabricName": "string"}` | | `network.device.replaced` | Network device replaced with another | `{"oldNetworkDeviceId": "string", "newNetworkDeviceId": "string"}` | | `network.device.credentials.updated` | Device credentials changed | `{"networkDeviceId": "string", "managementAddress": "string", "identifierString": "string", "driver": "string", "position": "string", "siteId": "string", "userIdAuthenticated": "string"}` | ### Instance Management Events Instance and DNS lifecycle events from the orchestrator microservice. | Event Type | Description | Data Structure | |------------|-------------|----------------| | `instance.array.dns.updated` | Instance array DNS records updated | `{"instanceArrayId": "string", "infrastructureId": "string", "dnsRecords": "object[]", "userIdAuthenticated": "string"}` | | `instance.dns.updated` | Instance DNS records updated | `{"instanceId": "string", "infrastructureId": "string", "dnsRecords": "object[]", "userIdAuthenticated": "string"}` | | `instance.array.dns.deleted` | Instance array DNS records deleted | `{"instanceArrayId": "string", "infrastructureId": "string", "userIdAuthenticated": "string"}` | | `instance.dns.deleted` | Instance DNS records deleted | `{"instanceId": "string", "infrastructureId": "string", "userIdAuthenticated": "string"}` | ## Event Data Examples **Note**: All examples below show the complete CloudEvent format as it appears in Kafka. Each event includes the CloudEvent metadata (`id`, `time`, `type`, `source`, `specversion`, `datacontenttype`) and the event-specific data in the `data` field. Numeric values are serialized as strings in the JSON format. ### Server Management Event Examples #### Server Registration Initiated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.registration.initiated", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "managementAddress": "192.168.1.100", "siteId": "1" } } ``` #### Server Registered ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.registered", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "serverStatus": "AVAILABLE", "serverTypeId": "25", "siteId": "1", "userId": "456" } } ``` #### Server Reregistration Initiated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.reregistration.initiated", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "managementAddress": "192.168.1.100", "siteId": "1" } } ``` #### Server Production Registration Initiated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.production.registration.initiated", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "managementAddress": "192.168.1.100", "siteId": "1" } } ``` #### Server Production Registered ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.production.registered", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "serverStatus": "USED", "serverTypeId": "25", "siteId": "1", "userId": "456" } } ``` #### Server Updated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.updated", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "userId": "456", "changes": { "previousState": { "serverStatus": "UNAVAILABLE", "serverClass": "UNKNOWN" }, "currentState": { "serverStatus": "AVAILABLE", "serverClass": "BIGDATA" } } } } ``` #### Server Credentials Updated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.credentials.updated", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "userId": "456", "serverManagementAddress": "192.168.1.100" } } ``` #### Server Decommissioned ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.decommissioned", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "serverUUID": "550e8400-e29b-41d4-a716-446655440000", "serverClass": "BIGDATA", "serverStatus": "DECOMMISSIONED", "serverTypeId": "25" } } ``` #### Server Deleted ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "server.deleted", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "serverId": "123", "serverUUID": "550e8400-e29b-41d4-a716-446655440000", "serverClass": "BIGDATA", "serverStatus": "DECOMMISSIONED" } } ``` ### Security Event Examples #### User Created ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.created", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "New user account created" } } ``` #### User Credentials Changed ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.credentials.changed", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "User password updated successfully" } } ``` #### User Password Reset Requested ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.password.reset.requested", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "Password reset initiated for user" } } ``` #### User Suspended ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.suspended", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "User suspended due to policy violation" } } ``` #### User Unsuspended ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.unsuspended", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "User account reactivated" } } ``` #### User Email Updated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.email.updated", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "newemail@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "User email address changed from oldemail@example.com" } } ``` #### User Email Verified ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.email.verified", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "123", "loggedInUserEmail": "user@example.com", "message": "Email address verified successfully" } } ``` #### User API Key Regenerated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.api.key.regenerated", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "API key regenerated for security purposes" } } ``` #### User SSH Key Created ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.ssh.key.created", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "123", "loggedInUserEmail": "user@example.com", "message": "SSH key added to user account" } } ``` #### User SSH Key Deleted ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.ssh.key.deleted", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "123", "loggedInUserEmail": "user@example.com", "message": "SSH key removed from user account" } } ``` #### User Delegate Added ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.delegate.added", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "Parent user ID: 123 with email user@example.com added delegate with ID 789 with email delegate@example.com" } } ``` #### User Delegate Removed ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.delegate.removed", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "Delegate access revoked from user" } } ``` #### User Enabled 2FA ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.2fa.enabled", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "123", "loggedInUserEmail": "user@example.com", "message": "Two-factor authentication enabled" } } ``` #### User Disabled 2FA ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.2fa.disabled", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "123", "loggedInUserEmail": "user@example.com", "message": "Two-factor authentication disabled" } } ``` #### User Access Level Set ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.access.level.set", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "User access level changed to Administrator" } } ``` #### User Archived ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.archived", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "User account archived" } } ``` #### User Unarchived ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "user.unarchived", "source": "https://metalsoft.io/auth-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "userId": "123", "userEmail": "user@example.com", "loggedInUserId": "456", "loggedInUserEmail": "admin@example.com", "message": "User account restored from archive" } } ``` ### Network Device Management Event Examples #### Network Device Created ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.created", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "networkDeviceId": "123", "managementAddress": "192.168.1.100", "identifierString": "switch-rack-01", "driver": "sonic_enterprise", "position": "leaf", "siteId": "456" } } ``` #### Network Device Registration Initiated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.registration.initiated", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "networkDeviceId": "123", "managementAddress": "192.168.1.100", "serialNumber": "SN123456789", "chassisIdentifier": "chassis-001", "managementMacAddress": "00:1B:21:B4:6E:3A" } } ``` #### Network Device Registered ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.registered", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "networkDeviceId": "123", "managementAddress": "192.168.1.100", "identifierString": "switch-rack-01", "driver": "sonic_enterprise", "position": "leaf", "siteId": "456" } } ``` #### Network Fabric Assignment ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.assigned.to.fabric", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "fabricId": "42", "networkDeviceIds": ["123", "124", "125"], "fabricName": "production-fabric-1" } } ``` #### Network Device Removed from Fabric ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.removed.from.fabric", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "fabricId": "42", "networkDeviceIds": ["123", "124", "125"], "fabricName": "production-fabric-1" } } ``` #### Network Device Credentials Updated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.credentials.updated", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "networkDeviceId": "123", "managementAddress": "192.168.1.100", "identifierString": "switch-rack-01", "driver": "sonic_enterprise", "position": "leaf", "siteId": "456", "userIdAuthenticated": "789" } } ``` #### Network Device Replaced ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.replaced", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "oldNetworkDeviceId": "100", "newNetworkDeviceId": "200" } } ``` #### Network Device Archived ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.archived", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "networkDeviceId": "123", "userIdAuthenticated": "456" } } ``` #### Network Device Deleted ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "network.device.deleted", "source": "https://metalsoft.io/inventory-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "networkDeviceId": "123", "position": "leaf", "siteId": "siteId":"1", "identifierString": "switch-rack-01", "userIdAuthenticated": "456" } } ``` ### Instance Management Event Examples #### Instance Array DNS Updated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "instance.array.dns.updated", "source": "https://metalsoft.io/orchestrator-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "instanceArrayId": "123", "infrastructureId": "456", "dnsRecords": [ { "hostname": "web-server-01.example.com", "type": "A", "value": "192.168.1.10" } ], "userIdAuthenticated": "789" } } ``` #### Instance DNS Updated ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "instance.dns.updated", "source": "https://metalsoft.io/orchestrator-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "instanceId": "123", "infrastructureId": "456", "dnsRecords": [ { "hostname": "database-01.example.com", "type": "A", "value": "192.168.1.20" } ], "userIdAuthenticated": "789" } } ``` #### Instance Array DNS Deleted ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "instance.array.dns.deleted", "source": "https://metalsoft.io/orchestrator-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "instanceArrayId": "123", "infrastructureId": "456", "userIdAuthenticated": "789" } } ``` #### Instance DNS Deleted ```json { "id": "event-id-123", "time": "2025-01-01T12:00:00.000Z", "type": "instance.dns.deleted", "source": "https://metalsoft.io/orchestrator-microservice", "specversion": "1.0", "datacontenttype": "application/json", "data": { "instanceId": "123", "infrastructureId": "456", "userIdAuthenticated": "789" } } ```