feat: per-host WinRM/SSH credentials override (0.5.17)
Allow host-level login/password for home/workgroup PCs while keeping global domain admins in Settings.
This commit is contained in:
@@ -14,7 +14,7 @@ from app.database import SessionLocal
|
||||
from app.models import Host
|
||||
from app.services.agent_update import execute_agent_update_fallback
|
||||
from app.services.agent_update_types import AgentUpdateFallbackResult
|
||||
from app.services.linux_admin_settings import get_effective_linux_admin_config
|
||||
from app.services.linux_admin_settings import get_effective_linux_admin_for_host
|
||||
from app.services.agent_update_settings import get_effective_agent_update_config
|
||||
from app.services.ssh_connect import (
|
||||
iter_ssh_targets,
|
||||
@@ -97,7 +97,7 @@ def _completion_message(result: SshCommandResult) -> str:
|
||||
|
||||
|
||||
def _fetch_ssh_update_log_tail(db: Session, host: Host, *, lines: int = 200) -> str:
|
||||
cfg = get_effective_linux_admin_config(db)
|
||||
cfg = get_effective_linux_admin_for_host(db, host)
|
||||
if not cfg.configured:
|
||||
return ""
|
||||
try:
|
||||
@@ -191,7 +191,7 @@ def _poll_ssh_update_log_loop(
|
||||
payload = dict(row.remote_action or {})
|
||||
if (payload.get("status") or "").strip().lower() != "running":
|
||||
continue
|
||||
cfg = get_effective_linux_admin_config(session)
|
||||
cfg = get_effective_linux_admin_for_host(session, row)
|
||||
if not cfg.configured:
|
||||
continue
|
||||
try:
|
||||
@@ -322,7 +322,7 @@ def start_host_remote_action(
|
||||
|
||||
|
||||
def run_ssh_monitor_update_action(db: Session, host: Host) -> SshCommandResult:
|
||||
cfg = get_effective_linux_admin_config(db)
|
||||
cfg = get_effective_linux_admin_for_host(db, host)
|
||||
if not cfg.configured:
|
||||
return SshCommandResult(
|
||||
ok=False,
|
||||
|
||||
Reference in New Issue
Block a user