Owners represent the entities that control components. A component has two optional owners:
| Role | Field | Meaning |
|------|-------|---------|
| Business | business_owner_id | Client, contract holder, project sponsor |
| Technical | technical_owner_id | Ops team, sysadmin, DevOps |
Owner Types #
| Type | Usage |
|------|-------|
| local | This BeamReactor instance |
| remote | External site / federated node |
| client | End customer / tenant |
| org | Organisation / department |
| system | System-level (cron, scheduler) |
Creating Owners #
// Business owner (a client)
$client_id = CMDB::createOwner('client', 'acme-corp', 'ACME Corporation',
'https://acme.example.com/api', // remote endpoint
'admin@acme.com',
['contract' => 'PRO-2026', 'sla' => '99.9%'], // metadata
3 // trust level (high)
);
// Technical owner (ops team)
$ops_id = CMDB::createOwner('local', 'devops-team', 'DevOps Team');
Owner Methods #
| Method | Returns | Description |
|--------|---------|-------------|
| createOwner($type, $name, ...) | int\|false | Create or update an owner (upsert) |
| getOwner(int $id) | array\|false | Get owner by ID (decodes metadata JSON) |
| findOwner($type, $name) | array\|false | Find owner by type + name |
| listOwners(?$type, ?$status) | array | List owners with optional filters |
| setOwnerStatus($id, $status) | int | Change status: active, suspended, revoked, pending |
| getOwnedComponents($id, $role) | array | List components for an owner (business/technical/any) |
Inter-Site Authentication #
Owners can hold an API key for remote authentication:
// Generate and set (store the plain key, only the hash is saved)
$api_key = bin2hex(random_bytes(32));
CMDB::setOwnerApiKey($owner_id, $api_key);
// Verify later
if (CMDB::verifyOwnerApiKey($owner_id, $incoming_key))
{
// Authenticated
}
Keys are hashed with Argon2ID. The plain key is never stored.
Trust Levels #
| Level | Meaning |
|-------|---------|
| 1 | Maximum trust (internal core) |
| 3 | High trust (known partner) |
| 5 | Standard (default) |
| 7 | Low trust (new/unverified) |
| 9 | Minimal trust (sandboxed) |