Выполнение шага 5:
• Updated Plan
└ Продолжаю итерацию 5 как отдельный рабочий срез поверх текущих SSH credentials.
□ Добавить модель/миграцию/repository для host_scans и покрыть repository тестами
□ Добавить SSH command runner и LinuxHostScanner с whitelist read-only команд
□ Подключить controller/routes/UI для запуска deep scan и просмотра результата
□ Прогнать проверки и зафиксировать ограничения Docker-верификации
This commit is contained in:
+26
-1
@@ -71,6 +71,9 @@ $containerBuilder->addDefinitions([
|
||||
\Domovoy\Repositories\DiscoveredHostRepository::class => function ($c) {
|
||||
return new \Domovoy\Repositories\DiscoveredHostRepository($c->get(PDO::class));
|
||||
},
|
||||
\Domovoy\Repositories\CredentialRepository::class => function ($c) {
|
||||
return new \Domovoy\Repositories\CredentialRepository($c->get(PDO::class));
|
||||
},
|
||||
\Domovoy\Repositories\AuditLogRepository::class => function ($c) {
|
||||
return new \Domovoy\Repositories\AuditLogRepository($c->get(PDO::class));
|
||||
},
|
||||
@@ -108,6 +111,16 @@ $containerBuilder->addDefinitions([
|
||||
\Domovoy\Services\AuthService::class => function ($c) {
|
||||
return new \Domovoy\Services\AuthService($c->get(\Domovoy\Repositories\UserRepository::class));
|
||||
},
|
||||
\Domovoy\Services\Security\CredentialVault::class => function ($c) {
|
||||
return new \Domovoy\Services\Security\CredentialVault($c->get('settings')['app']['encryption_key']);
|
||||
},
|
||||
\Domovoy\Services\Ssh\SshCredentialTester::class => function ($c) {
|
||||
return new \Domovoy\Services\Ssh\SshCredentialTester(
|
||||
$c->get(\Domovoy\Services\Security\CredentialVault::class),
|
||||
null,
|
||||
$c->get('settings')['ssh']
|
||||
);
|
||||
},
|
||||
// Controllers
|
||||
\Domovoy\Controllers\AuthController::class => function ($c) {
|
||||
return new \Domovoy\Controllers\AuthController($c->get(\Domovoy\Services\AuthService::class));
|
||||
@@ -149,7 +162,16 @@ $containerBuilder->addDefinitions([
|
||||
\Domovoy\Controllers\DeviceController::class => function ($c) {
|
||||
return new \Domovoy\Controllers\DeviceController(
|
||||
$c->get(\Domovoy\Services\Inventory\DeviceService::class),
|
||||
$c->get(\Domovoy\Repositories\DiscoveredHostRepository::class)
|
||||
$c->get(\Domovoy\Repositories\DiscoveredHostRepository::class),
|
||||
$c->get(\Domovoy\Repositories\CredentialRepository::class)
|
||||
);
|
||||
},
|
||||
\Domovoy\Controllers\CredentialController::class => function ($c) {
|
||||
return new \Domovoy\Controllers\CredentialController(
|
||||
$c->get(\Domovoy\Services\Inventory\DeviceService::class),
|
||||
$c->get(\Domovoy\Repositories\CredentialRepository::class),
|
||||
$c->get(\Domovoy\Services\Security\CredentialVault::class),
|
||||
$c->get(\Domovoy\Services\Ssh\SshCredentialTester::class)
|
||||
);
|
||||
},
|
||||
\Domovoy\Controllers\DiscoveriesController::class => function ($c) {
|
||||
@@ -211,6 +233,9 @@ $app->group('', function (\Slim\Routing\RouteCollectorProxy $group) {
|
||||
$group->post('/devices/{id}/update', [\Domovoy\Controllers\DeviceController::class, 'update'])->setName('devices.update');
|
||||
$group->post('/devices/{id}/delete', [\Domovoy\Controllers\DeviceController::class, 'delete'])->setName('devices.delete');
|
||||
$group->post('/devices/from-host', [\Domovoy\Controllers\DeviceController::class, 'createFromHost'])->setName('devices.from_host');
|
||||
$group->post('/devices/{id}/credentials', [\Domovoy\Controllers\CredentialController::class, 'create'])->setName('credentials.create');
|
||||
$group->post('/devices/{deviceId}/credentials/{id}/test', [\Domovoy\Controllers\CredentialController::class, 'test'])->setName('credentials.test');
|
||||
$group->post('/devices/{deviceId}/credentials/{id}/delete', [\Domovoy\Controllers\CredentialController::class, 'delete'])->setName('credentials.delete');
|
||||
});
|
||||
|
||||
$app->run();
|
||||
|
||||
Reference in New Issue
Block a user