feat: accept native Windows passive client and tenant-safe inventory migration
Rust development slice / linux (push) Failing after 6s
Rust development slice / linux (push) Failing after 6s
This commit is contained in:
@@ -1,20 +1,26 @@
|
|||||||
# Rust Discovery / RMM — Linux-MVP und Windows-Vorbereitung
|
# Rust Discovery / RMM — Linux-MVP und Windows-Client
|
||||||
|
|
||||||
> **Entwicklung wiederaufgenommen (2026-11-13).** Der Server zieht auf ausdrücklichen
|
> **Entwicklung wiederaufgenommen (2026-11-13).** Der endgültige Server läuft auf
|
||||||
> Userwunsch auf einen dedizierten Internetserver um; der Entwickler-PC dient
|
> `discovery.ease-technologies.de`; der Entwickler-PC dient
|
||||||
> ausschließlich als Entwicklungsrechner, ohne installierten RMM-Client. Die
|
> ausschließlich als Entwicklungsrechner, ohne installierten RMM-Client. Die
|
||||||
> Cloud-Test-VM ist der aktuelle Client. Aktuelle Topologie und tatsächlicher
|
> Cloud-Linux-VM und eigenständiger Windows-11-Gast sind die Testclients. Topologie und
|
||||||
> Deploymentstand: [docs/server-deployment.md](docs/server-deployment.md).
|
> Deploymentstand: [docs/server-deployment.md](docs/server-deployment.md).
|
||||||
> Die lokalen Serverbefehle und Slice-Beschreibungen unten sind historisch.
|
> Die lokalen Serverbefehle und Slice-Beschreibungen unten sind historisch.
|
||||||
|
|
||||||
**Aktuell (Spezifikation 1.9):** Windows darf auf ausdrücklichen Userwunsch bereits
|
**Aktuell (Spezifikation 1.9):** Windows darf auf ausdrücklichen Userwunsch bereits
|
||||||
parallel entwickelt werden. Windows-11-VM per abgesichertem Reverse-SSH mit
|
parallel entwickelt werden. Erster nativer Windows-Client als LocalService mit
|
||||||
Administratortoken erreichbar; noch kein RMM-Windows-Client installiert.
|
mTLS/WSS, gespeichertem Inventar, zwei frischen Heartbeats und Mandantentrennung
|
||||||
|
auf der Windows-11-VM nachgewiesen. Sieben native Tests bestanden.
|
||||||
|
Keine Windows-Jobcapability, erster Build unsigniert.
|
||||||
Linux-Cloud-Agent, getrennte API/Gateway-Rollen, echte WebUI-Genehmigung und
|
Linux-Cloud-Agent, getrennte API/Gateway-Rollen, echte WebUI-Genehmigung und
|
||||||
native Basis-/Rootdienstjobs sind nachgewiesen. APT-100-Ursache gefunden und
|
native Basis-/Rootdienstjobs sind nachgewiesen. APT-100-Ursache gefunden und
|
||||||
Provider-/Sandboxkorrektur nativ als Readiness geprüft; Paketabnahme selbst
|
Provider-/Sandboxkorrektur nativ als Readiness geprüft. Neuer einzeln WebUI-
|
||||||
bleibt offen. Aktueller Stand: [Implementierungsstand](docs/implementation-status.md),
|
genehmigter Versuch entpackte Fixture 1.0, aber konfigurierte sie nicht:
|
||||||
[Windows-Entwicklungszugang](deploy/windows/README.md).
|
**unknown**, keine Acceptance, keine weitere Paketwirkung. Configure-Korrektur
|
||||||
|
lokal geprüft, nicht auf Cloud installiert. Aktueller Stand:
|
||||||
|
[Implementierungsstand](docs/implementation-status.md),
|
||||||
|
[Windows-Client](deploy/windows/CLIENT.md), [Plattformmatrix](docs/platform-support.md),
|
||||||
|
[Entwicklungszugang](deploy/windows/README.md).
|
||||||
|
|
||||||
## Historischer erster passiver Slice
|
## Historischer erster passiver Slice
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
//! Development-only read-only receipt inspection. No network, grants or effects.
|
||||||
|
#[cfg(windows)]
|
||||||
|
fn main() -> anyhow::Result<()> {
|
||||||
|
let root = std::path::Path::new(r"C:\ProgramData\RustDiscovery\state");
|
||||||
|
rmm_agent_windows::native::private_path(root, true)?;
|
||||||
|
let path = root.join("telemetry.sqlite");
|
||||||
|
rmm_agent_windows::native::private_path(&path, false)?;
|
||||||
|
let db =
|
||||||
|
rusqlite::Connection::open_with_flags(path, rusqlite::OpenFlags::SQLITE_OPEN_READ_ONLY)?;
|
||||||
|
let count: u64 = db.query_row("SELECT count(*) FROM events", [], |r| r.get(0))?;
|
||||||
|
let sequence: u64 =
|
||||||
|
db.query_row("SELECT value FROM metadata WHERE key='sequence'", [], |r| {
|
||||||
|
r.get(0)
|
||||||
|
})?;
|
||||||
|
let agent: String = db.query_row("SELECT agent FROM identity", [], |r| r.get(0))?;
|
||||||
|
let integrity: String = db.query_row("PRAGMA integrity_check", [], |r| r.get(0))?;
|
||||||
|
println!(
|
||||||
|
"{}",
|
||||||
|
serde_json::json!({"agent_id":agent,"pending_inventory_events":count,"sequence":sequence,"integrity":integrity,"read_only":true})
|
||||||
|
);
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
#[cfg(not(windows))]
|
||||||
|
fn main() {
|
||||||
|
eprintln!("Windows-only receipt probe");
|
||||||
|
std::process::exit(1);
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
#![cfg(windows)]
|
||||||
|
use anyhow::{Result, ensure};
|
||||||
|
use rmm_agent_windows::native::{private_path, service_sid, wide};
|
||||||
|
use std::{path::Path, ptr};
|
||||||
|
use windows_sys::Win32::{
|
||||||
|
Foundation::LocalFree,
|
||||||
|
Security::{
|
||||||
|
Authorization::ConvertStringSecurityDescriptorToSecurityDescriptorW,
|
||||||
|
DACL_SECURITY_INFORMATION, OWNER_SECURITY_INFORMATION, PROTECTED_DACL_SECURITY_INFORMATION,
|
||||||
|
SetFileSecurityW,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
fn apply(path: &Path, sddl: &str) -> Result<()> {
|
||||||
|
let text = wide(sddl);
|
||||||
|
let name = wide(path);
|
||||||
|
let mut descriptor = ptr::null_mut();
|
||||||
|
// SAFETY: Windows parses a test-owned SDDL into one owned descriptor.
|
||||||
|
ensure!(
|
||||||
|
unsafe {
|
||||||
|
ConvertStringSecurityDescriptorToSecurityDescriptorW(
|
||||||
|
text.as_ptr(),
|
||||||
|
1,
|
||||||
|
&mut descriptor,
|
||||||
|
ptr::null_mut(),
|
||||||
|
)
|
||||||
|
} != 0,
|
||||||
|
"TEST_DESCRIPTOR"
|
||||||
|
);
|
||||||
|
let result = unsafe {
|
||||||
|
SetFileSecurityW(
|
||||||
|
name.as_ptr(),
|
||||||
|
OWNER_SECURITY_INFORMATION
|
||||||
|
| DACL_SECURITY_INFORMATION
|
||||||
|
| PROTECTED_DACL_SECURITY_INFORMATION,
|
||||||
|
descriptor,
|
||||||
|
)
|
||||||
|
};
|
||||||
|
unsafe {
|
||||||
|
LocalFree(descriptor.cast());
|
||||||
|
}
|
||||||
|
ensure!(result != 0, "TEST_ACL_APPLY");
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
#[test]
|
||||||
|
fn actual_windows_acl_rejects_broad_null_and_reparse_paths() {
|
||||||
|
// Explicit development VM test. Only a new empty temporary directory and
|
||||||
|
// its dummy nonsecret file are touched; never the running device identity.
|
||||||
|
let root = std::env::temp_dir().join(format!("rmm-private-acl-{}", uuid::Uuid::new_v4()));
|
||||||
|
std::fs::create_dir(&root).unwrap();
|
||||||
|
let sid = service_sid().unwrap();
|
||||||
|
let strict = format!("O:BAD:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)(A;OICI;0x1301bf;;;{sid})");
|
||||||
|
apply(&root, &strict).unwrap();
|
||||||
|
private_path(&root, true).unwrap();
|
||||||
|
let file = root.join("dummy.txt");
|
||||||
|
std::fs::write(&file, b"nonsecret fixture").unwrap();
|
||||||
|
private_path(&file, false).unwrap();
|
||||||
|
assert!(private_path(&file, true).is_err());
|
||||||
|
apply(&file, "O:BAD:P(A;;FA;;;SY)(A;;FA;;;BA)(A;;FR;;;BU)").unwrap();
|
||||||
|
assert!(private_path(&file, false).is_err());
|
||||||
|
apply(&file, "O:BAD:NO_ACCESS_CONTROL").unwrap();
|
||||||
|
assert!(private_path(&file, false).is_err());
|
||||||
|
apply(&file, &strict).unwrap();
|
||||||
|
let link = root.join("dummy-link.txt");
|
||||||
|
std::os::windows::fs::symlink_file(&file, &link).unwrap();
|
||||||
|
assert!(private_path(&link, false).is_err());
|
||||||
|
std::fs::remove_file(link).unwrap();
|
||||||
|
std::fs::remove_file(file).unwrap();
|
||||||
|
std::fs::remove_dir(root).unwrap();
|
||||||
|
}
|
||||||
@@ -84,6 +84,12 @@ def deploy(payload):
|
|||||||
require(json.loads((backup/'build-result.json').read_text())['exit_code'] == 0, 'build must pass')
|
require(json.loads((backup/'build-result.json').read_text())['exit_code'] == 0, 'build must pass')
|
||||||
require(all(hashlib.sha256((root/name).read_bytes()).hexdigest() == sha for name,sha in record['files'].items()), 'source drift')
|
require(all(hashlib.sha256((root/name).read_bytes()).hexdigest() == sha for name,sha in record['files'].items()), 'source drift')
|
||||||
require(not (backup/'deploy-result.json').exists(), 'deployment already recorded')
|
require(not (backup/'deploy-result.json').exists(), 'deployment already recorded')
|
||||||
|
if payload.get('closed_policy_sha256'):
|
||||||
|
import datetime as dt
|
||||||
|
policy = (root/'devstate/root-policy/policy.json').read_bytes()
|
||||||
|
require(hashlib.sha256(policy).hexdigest() == payload['closed_policy_sha256'] and
|
||||||
|
dt.datetime.fromisoformat(json.loads(policy)['expires_at']) < dt.datetime.now(dt.timezone.utc),
|
||||||
|
'known unknown requires closed root policy')
|
||||||
raw = base64.b64decode(payload['web_tar'], validate=True)
|
raw = base64.b64decode(payload['web_tar'], validate=True)
|
||||||
require(hashlib.sha256(raw).hexdigest() == payload['web_sha256'], 'reviewed web archive hash')
|
require(hashlib.sha256(raw).hexdigest() == payload['web_sha256'], 'reviewed web archive hash')
|
||||||
# Publish immutable hashed assets before index, keeping the bind-mounted
|
# Publish immutable hashed assets before index, keeping the bind-mounted
|
||||||
@@ -118,6 +124,7 @@ def deploy(payload):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description=__doc__); parser.add_argument('action', choices=('stage','status','deploy')); parser.add_argument('--id')
|
parser = argparse.ArgumentParser(description=__doc__); parser.add_argument('action', choices=('stage','status','deploy')); parser.add_argument('--id')
|
||||||
|
parser.add_argument('--preserve-known-unknown', action='store_true', help='Windows inventory migration only; preserve exact fenced APT evidence')
|
||||||
args = parser.parse_args(); os.umask(0o077); STATE.mkdir(mode=0o700, parents=True, exist_ok=True)
|
args = parser.parse_args(); os.umask(0o077); STATE.mkdir(mode=0o700, parents=True, exist_ok=True)
|
||||||
if args.action == 'stage':
|
if args.action == 'stage':
|
||||||
names = ['Cargo.toml','Cargo.lock','rust-toolchain.toml','deploy/Dockerfile','deploy/linux/rmm-apt-helper.service',
|
names = ['Cargo.toml','Cargo.lock','rust-toolchain.toml','deploy/Dockerfile','deploy/linux/rmm-apt-helper.service',
|
||||||
@@ -135,11 +142,26 @@ def main():
|
|||||||
print(dict(id=ident, launched=result['launched'], deployed=False))
|
print(dict(id=ident, launched=result['launched'], deployed=False))
|
||||||
else:
|
else:
|
||||||
ident = str(uuid.UUID(args.id)); cloud.contract.protected_json(STATE/(ident+'.json'))
|
ident = str(uuid.UUID(args.id)); cloud.contract.protected_json(STATE/(ident+'.json'))
|
||||||
|
before = None; payload = dict(id=ident)
|
||||||
if args.action == 'deploy':
|
if args.action == 'deploy':
|
||||||
target = cloud.contract.protected_json(cloud.ROOT/'devstate/remote-vm.json')['identity']
|
target = cloud.contract.protected_json(cloud.ROOT/'devstate/remote-vm.json')['identity']
|
||||||
gate = cloud.bootstrap.rpc('server.conf', cloud.server, dict(kind='gate', tenant_id=cloud.TENANT, agent_id=target['agent_id']))
|
gate = cloud.bootstrap.rpc('server.conf', cloud.server, dict(kind='gate', tenant_id=cloud.TENANT, agent_id=target['agent_id']))
|
||||||
require(gate['unresolved'] == 0, 'unresolved cloud job; no server switch')
|
if args.preserve_known_unknown:
|
||||||
payload = dict(id=ident)
|
import cloud_apt_retry as apt
|
||||||
|
checkpoint = cloud.contract.protected_json(apt.STATE/'apt_install_retry/checkpoint.json')
|
||||||
|
job = checkpoint['plan']['jobs'][0]
|
||||||
|
require(checkpoint['stage'] == 'unknown' and checkpoint['audit']['simulation'] is True and
|
||||||
|
gate == dict(jobs=13, outbox=13, permits=12, unresolved=1), 'one exact known unknown required')
|
||||||
|
current = cloud.Backend().call('jobs.get', dict(tenant_id=cloud.TENANT, job_id=job['job_id']))
|
||||||
|
require(current['state'] == 'unknown' and current['attempt_id'] == job['attempt_id'], 'same unknown attempt required')
|
||||||
|
before = cloud.bootstrap.rpc('linux-vm.conf', apt.stored_attempt_evidence,
|
||||||
|
dict(job_id=job['job_id'], attempt_id=job['attempt_id']))
|
||||||
|
require(before['ledger']['unresolved'] == 1 and before['ledger']['consumed'] == 9 and
|
||||||
|
before['ledger']['result'] is None and before['ledger']['outcome']['error_code'] == 'DPKG_INCONSISTENT', 'preserve exact native unknown')
|
||||||
|
closed = cloud.contract.protected_json(apt.STATE/'policy-closed.json')
|
||||||
|
payload['closed_policy_sha256'] = closed['policy_sha256']
|
||||||
|
require((cloud.ROOT/'migrations/0013_windows_inventory_scope.sql').is_file(), 'additive Windows migration only')
|
||||||
|
else: require(gate['unresolved'] == 0, 'unresolved cloud job; no server switch')
|
||||||
if args.action == 'deploy':
|
if args.action == 'deploy':
|
||||||
stream = io.BytesIO()
|
stream = io.BytesIO()
|
||||||
with tarfile.open(fileobj=stream, mode='w:') as archive:
|
with tarfile.open(fileobj=stream, mode='w:') as archive:
|
||||||
@@ -149,6 +171,15 @@ def main():
|
|||||||
archive.add(p, arcname=str(p.relative_to(cloud.ROOT/'web/dist')), recursive=False)
|
archive.add(p, arcname=str(p.relative_to(cloud.ROOT/'web/dist')), recursive=False)
|
||||||
data = stream.getvalue(); payload.update(web_tar=base64.b64encode(data).decode(), web_sha256=hashlib.sha256(data).hexdigest())
|
data = stream.getvalue(); payload.update(web_tar=base64.b64encode(data).decode(), web_sha256=hashlib.sha256(data).hexdigest())
|
||||||
result = cloud.bootstrap.rpc('server.conf', status if args.action == 'status' else deploy, payload)
|
result = cloud.bootstrap.rpc('server.conf', status if args.action == 'status' else deploy, payload)
|
||||||
|
if before is not None:
|
||||||
|
after = cloud.bootstrap.rpc('linux-vm.conf', apt.stored_attempt_evidence,
|
||||||
|
dict(job_id=job['job_id'], attempt_id=job['attempt_id']))
|
||||||
|
gate_after = cloud.bootstrap.rpc('server.conf', cloud.server, dict(kind='gate', tenant_id=cloud.TENANT, agent_id=target['agent_id']))
|
||||||
|
current = cloud.Backend().call('jobs.get', dict(tenant_id=cloud.TENANT, job_id=job['job_id']))
|
||||||
|
require(before == after and gate_after == gate and current['state'] == 'unknown' and current['attempt_id'] == job['attempt_id'],
|
||||||
|
'unknown evidence or execution artifacts changed during Windows migration')
|
||||||
|
cloud.contract.write_private(STATE/(ident+'.unknown-preserved.json'), dict(evidence=after, gate=gate_after, result=current))
|
||||||
|
result['unknown_attempt_preserved'] = True
|
||||||
print(result)
|
print(result)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ Große PowerShell-Console-JSON-Eingaben waren als Bootstraptransport ungeeignet
|
|||||||
Artefaktverzeichnisse werden nach Hash neu angelegt, keine vorhandene Identität
|
Artefaktverzeichnisse werden nach Hash neu angelegt, keine vorhandene Identität
|
||||||
oder Historie gelöscht. Private Evidenz: `devstate/windows-client/`.
|
oder Historie gelöscht. Private Evidenz: `devstate/windows-client/`.
|
||||||
|
|
||||||
## Implementiert, Dienst-/Online-Abnahme noch offen
|
## Nativer Dienst, Inventar und verbleibender Umfang
|
||||||
|
|
||||||
- Nativer SCM-Dienstlebenszyklus, vorgesehen als `LocalService` mit eigenem
|
- Nativer SCM-Dienstlebenszyklus als `LocalService` mit eigenem
|
||||||
Service-SID-Zugriff auf Zustand und ausschließlich lesbarem Programm/Config.
|
Service-SID-Zugriff auf Zustand und ausschließlich lesbarem Programm/Config.
|
||||||
- Windows prüft Owner/DACL und verweigert Reparse-Points/breite ACLs. Geräteschlüssel
|
- Windows prüft Owner/DACL und verweigert Reparse-Points/breite ACLs. Geräteschlüssel
|
||||||
werden nur auf Windows erzeugt; Enrollment über CA- und namensgeprüftes TLS,
|
werden nur auf Windows erzeugt; Enrollment über CA- und namensgeprüftes TLS,
|
||||||
@@ -45,11 +45,48 @@ oder Historie gelöscht. Private Evidenz: `devstate/windows-client/`.
|
|||||||
**Kein Jobexecutor, keine PowerShell-Jobfähigkeit, kein privilegierter Helper.**
|
**Kein Jobexecutor, keine PowerShell-Jobfähigkeit, kein privilegierter Helper.**
|
||||||
Angebote/Startgrants werden verweigert. Es gibt keine Genehmigungsabkürzung.
|
Angebote/Startgrants werden verweigert. Es gibt keine Genehmigungsabkürzung.
|
||||||
|
|
||||||
|
Tatsächlich installiert und gestartet: nativer SCM-Dienst mit eigenem Service-SID
|
||||||
|
unter `NT AUTHORITY\LocalService`; tatsächlicher Prozessowner `S-1-5-19`, nicht
|
||||||
|
Administrator/SYSTEM. Eigener Geräteschlüssel auf Windows erzeugt, einmaliges
|
||||||
|
Enrollment erfolgreich und Tokenkopie entfernt; mTLS-Hello und frischer Heartbeat
|
||||||
|
serverseitig bestätigt. Der erste `.ps1`-Aufruf wurde durch die lokale
|
||||||
|
Ausführungsrichtlinie vor jeder Installerwirkung verweigert. Verzeichnis, Dienst
|
||||||
|
und Identität waren nachweislich nicht angelegt; erst danach kontrollierte
|
||||||
|
Fortsetzung mit explizit **prozessbezogenem** `RemoteSigned` wie beim ursprünglichen
|
||||||
|
Bootstrap. Keine Änderung der Maschinen-/Gruppenrichtlinie, keine Jobausnahme.
|
||||||
|
|
||||||
|
Native Rust-Testprogramme direkt über den gepinnten SSH-Zugang ausgeführt:
|
||||||
|
**3 Transporttests + 3 Bibliothekstests + 1 ACL-Integrationstest bestanden**. Diese prüfen Namens-/URL-
|
||||||
|
Validierung und sichere Fallbackauswahl, echte Windows-Inventardaten, zwei
|
||||||
|
unabhängige stabile Bootabfragen sowie SQLite-Reopen, monotone Sequenz,
|
||||||
|
Prozesssperre, gezielten ACK und Identitätsbindung. Der zusätzliche native ACL-Test
|
||||||
|
weist korrekte ACLs nach und verweigert breite ACLs, NULL-DACLs, falschen Pfadtyp
|
||||||
|
und Reparse-Points an ausschließlich neu erzeugten nichtgeheimen Tempfixtures. PowerShell-Pipelinewrapper
|
||||||
|
warteten bei nativen Testprogrammen; direkte native Ausführung lieferte Exit 0.
|
||||||
|
|
||||||
|
Der tatsächliche Online-Lauf fand eine weitere echte Grenze: Migration 0001
|
||||||
|
beschränkte `observations.source_id` auf `linux.base`. Daher bisher Heartbeats,
|
||||||
|
aber kein gespeichertes Windowsinventar. Additive Migration 0013 erweitert nur
|
||||||
|
diesen CHECK auf die beiden validierten Basisscopes. Echter isolierter PostgreSQL-
|
||||||
|
Test der Migrationen 1–13 bestanden: alte Linuxzeile bytegleich, Windows erlaubt,
|
||||||
|
beliebiger Scope verweigert, RLS bei fremdem/fehlendem Kontext und zusammengesetzter
|
||||||
|
Geräte-FK erhalten, keine Jobs/Outbox/Grants. Cloudmigration 0013 anschließend tatsächlich erfolgreich. Der ursprüngliche
|
||||||
|
Windows-Journaleintrag wurde ohne Neuerhebung/Identitätsreset erneut zugestellt
|
||||||
|
und gespeichert: ursprüngliches `observed_at` bleibt erhalten, `received_at` ist
|
||||||
|
separat. Geräte-API/MCP melden `source_id=windows.base`, korrektes Windowsinventar
|
||||||
|
und Inodes `null`; zwei verschiedene frische Heartbeats und `online` belegt.
|
||||||
|
Mandant B wurde sowohl für den A-Kontext als auch für seine eigene Mandantensicht
|
||||||
|
mit der fremden Asset-ID abgewiesen. Gerätespezifisch **0 Jobs / 0 Outbox /
|
||||||
|
0 Startgrants / 0 offene Versuche**. Keine WebUI-Genehmigung ausgeführt, weil diese
|
||||||
|
Strecke ausschließlich passive Standardbeobachtungen verarbeitet.
|
||||||
|
|
||||||
Dieser erste Entwicklungsbuild ist **unsigniert**. Kein produktiver signierter
|
Dieser erste Entwicklungsbuild ist **unsigniert**. Kein produktiver signierter
|
||||||
Installer/MSVC-Supportnachweis, keine Zertifikatsrotations-/Widerrufs-/Proxy- oder
|
Installer/MSVC-Supportnachweis, keine Zertifikatsrotations-/Widerrufs-/Proxy- oder
|
||||||
Windows-Paket-/Dienstaktionsabnahme. Native Testprogramme sowie die tatsächliche
|
Windows-Paket-/Dienstaktionsabnahme. Der native Onlinenachweis verwendet WSS;
|
||||||
SCM-/Enrollment-/mTLS-/Inventarstrecke sind zum Zeitpunkt dieses Abschnitts noch
|
HTTPS-/Fallbackmodi sind gemeinsam implementiert, nativ auf Windows noch nicht
|
||||||
offen. Ein erfolgreicher Crossbuild bzw. `--native-probe` ersetzt sie nicht.
|
abgenommen. Die passive SCM-/Enrollment-/mTLS-/Inventar-/Mandantentrennungsstrecke sowie
|
||||||
|
die oben benannten nativen Tests sind nun tatsächlich getrennt belegt.
|
||||||
|
Dies ist keine vollständige Windows-/Linux-MVP-Abnahme.
|
||||||
|
|
||||||
## Ausgeführte und geplante Befehle
|
## Ausgeführte und geplante Befehle
|
||||||
|
|
||||||
@@ -58,8 +95,23 @@ Tatsächlich ausgeführt: Docker-Build und gezielte Rust-Prüfungen oben sowie
|
|||||||
und `python3 deploy/windows/client_bootstrap.py probe` gegen ausschließlich den
|
und `python3 deploy/windows/client_bootstrap.py probe` gegen ausschließlich den
|
||||||
Windows-Gast. Keine RMM-Jobs oder Genehmigungen wurden dabei erzeugt.
|
Windows-Gast. Keine RMM-Jobs oder Genehmigungen wurden dabei erzeugt.
|
||||||
|
|
||||||
Geplant, noch nicht als bestanden behauptet: native Testprogramme und
|
Zusätzlich tatsächlich ausgeführt: native `test-lib`/`test-bin`/`test-acl`, Installer nach
|
||||||
`Install-PassiveClient.ps1` über `client_bootstrap.py install`, anschließend
|
nachgewiesenem Nichtstart mit `install-after-nonstart` und die oben benannte
|
||||||
zwei frische Heartbeats, korrekt zugeordnetes Inventar und Tenant-B-Verweigerung.
|
PostgreSQL-Migrationsprüfung sowie `passive-acceptance` gegen den Cloudserver
|
||||||
|
mit gespeichertem Inventar, zwei Heartbeats, Tenant-B-Verweigerung und Null-Jobgate.
|
||||||
Installation ist create-only; bei Teilfehlern Zustand inspizieren und erhalten,
|
Installation ist create-only; bei Teilfehlern Zustand inspizieren und erhalten,
|
||||||
nicht blind neu enrollen oder den Bootstrap wiederholen.
|
nicht blind neu enrollen oder den Bootstrap wiederholen.
|
||||||
|
|
||||||
|
Native ergänzende Receiptprüfung: das separate Entwicklungstool
|
||||||
|
`examples/passive_state.rs` öffnete ausschließlich die vorhandene Windows-SQLite
|
||||||
|
im Read-only-Modus. Integrität `ok`, feste Geräteidentität identisch, Sequenz 59,
|
||||||
|
**0 ausstehende Inventarereignisse**: der konkrete Server-ACK wurde lokal verbucht.
|
||||||
|
Keine neue Erhebung, kein Journalreset und kein neues Enrollment für diesen Nachweis.
|
||||||
|
|
||||||
|
Bekannte Darstellungsgrenze des ersten Collectors: `os` enthält den tatsächlich
|
||||||
|
ausgelesenen Registry-Produktnamen samt DisplayVersion/Build. Auf dieser Windows-
|
||||||
|
11-Pro-VM lautet der historische Registrywert noch `Windows 10 Pro`, mit
|
||||||
|
`DisplayVersion=26H2; Build=26300`. Die unabhängige native CIM-Probe bestätigt
|
||||||
|
Windows 11 Pro. Der Registrywert wird nicht stillschweigend als Marketingversion
|
||||||
|
uminterpretiert; eine einheitliche, quellenbewusste OS-Bezeichnung ist noch offen.
|
||||||
|
Die aktuelle Capability bleibt deshalb ausdrücklich partielles Basisinventar.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import os
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parents[2]
|
ROOT = Path(__file__).resolve().parents[2]
|
||||||
sys.path.insert(0, str(ROOT / 'deploy'))
|
sys.path.insert(0, str(ROOT / 'deploy'))
|
||||||
@@ -44,7 +45,7 @@ def powershell(script, payload=None, timeout=60, remote_signed=False):
|
|||||||
UPLOAD = r'''
|
UPLOAD = r'''
|
||||||
$ErrorActionPreference='Stop'
|
$ErrorActionPreference='Stop'
|
||||||
$p=([Console]::In.ReadLine() | ConvertFrom-Json)
|
$p=([Console]::In.ReadLine() | ConvertFrom-Json)
|
||||||
if ($p.name -notmatch '^((rmm-agent-windows|windows-tests-(lib|bin))\.exe|Install-PassiveClient\.ps1)$') {throw 'Artifact allowlist'}
|
if ($p.name -notmatch '^((rmm-agent-windows|windows-tests-(lib|bin|acl))\.exe|Install-PassiveClient\.ps1|PassiveStateProbe\.exe)$') {throw 'Artifact allowlist'}
|
||||||
$root='C:\ProgramData\RustDiscoveryBootstrap'
|
$root='C:\ProgramData\RustDiscoveryBootstrap'
|
||||||
if (!(Test-Path -LiteralPath $root)) {
|
if (!(Test-Path -LiteralPath $root)) {
|
||||||
New-Item -ItemType Directory -Path $root | Out-Null
|
New-Item -ItemType Directory -Path $root | Out-Null
|
||||||
@@ -67,7 +68,7 @@ if (Test-Path -LiteralPath $path) {throw 'Artifact already exists'}
|
|||||||
VERIFY_UPLOAD = r'''
|
VERIFY_UPLOAD = r'''
|
||||||
$ErrorActionPreference='Stop'
|
$ErrorActionPreference='Stop'
|
||||||
$p=([Console]::In.ReadLine() | ConvertFrom-Json)
|
$p=([Console]::In.ReadLine() | ConvertFrom-Json)
|
||||||
if ($p.sha256 -notmatch '^[0-9a-f]{64}$' -or $p.name -notmatch '^((rmm-agent-windows|windows-tests-(lib|bin))\.exe|Install-PassiveClient\.ps1)$') {throw 'Artifact allowlist'}
|
if ($p.sha256 -notmatch '^[0-9a-f]{64}$' -or $p.name -notmatch '^((rmm-agent-windows|windows-tests-(lib|bin|acl))\.exe|Install-PassiveClient\.ps1|PassiveStateProbe\.exe)$') {throw 'Artifact allowlist'}
|
||||||
$path='C:\ProgramData\RustDiscoveryBootstrap\'+$p.sha256+'\'+$p.name
|
$path='C:\ProgramData\RustDiscoveryBootstrap\'+$p.sha256+'\'+$p.name
|
||||||
$hash=(Get-FileHash -LiteralPath $path -Algorithm SHA256).Hash.ToLowerInvariant()
|
$hash=(Get-FileHash -LiteralPath $path -Algorithm SHA256).Hash.ToLowerInvariant()
|
||||||
if ($hash -cne $p.sha256) {throw 'Artifact hash'}
|
if ($hash -cne $p.sha256) {throw 'Artifact hash'}
|
||||||
@@ -84,18 +85,7 @@ $probe=$raw | ConvertFrom-Json
|
|||||||
$os=Get-CimInstance Win32_OperatingSystem -Property Caption,Version,OSArchitecture
|
$os=Get-CimInstance Win32_OperatingSystem -Property Caption,Version,OSArchitecture
|
||||||
[pscustomobject]@{probe=$probe;os_caption=$os.Caption;os_version=$os.Version;architecture=$os.OSArchitecture;native_execution=$true} | ConvertTo-Json -Depth 8 -Compress
|
[pscustomobject]@{probe=$probe;os_caption=$os.Caption;os_version=$os.Version;architecture=$os.OSArchitecture;native_execution=$true} | ConvertTo-Json -Depth 8 -Compress
|
||||||
'''
|
'''
|
||||||
TEST = r'''
|
|
||||||
$ErrorActionPreference='Stop'
|
|
||||||
$p=([Console]::In.ReadLine() | ConvertFrom-Json)
|
|
||||||
if ($p.kind -notin @('lib','bin')) {throw 'Test allowlist'}
|
|
||||||
if ($p.sha256 -notmatch '^[0-9a-f]{64}$') {throw 'Artifact hash format'}
|
|
||||||
$path='C:\ProgramData\RustDiscoveryBootstrap\'+$p.sha256+'\windows-tests-'+$p.kind+'.exe'
|
|
||||||
$out=& $path --test-threads=1 2>&1
|
|
||||||
$code=$LASTEXITCODE
|
|
||||||
$summary=@($out | Where-Object {"$_" -match '^test result: '})
|
|
||||||
if (!$summary) {throw 'No native test summary'}
|
|
||||||
[pscustomobject]@{exit_code=$code;native_execution=$true;summary=($summary -join ' ')} | ConvertTo-Json -Compress
|
|
||||||
'''
|
|
||||||
|
|
||||||
|
|
||||||
def record(name, evidence):
|
def record(name, evidence):
|
||||||
@@ -131,12 +121,12 @@ def upload(path, name):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser=argparse.ArgumentParser()
|
parser=argparse.ArgumentParser()
|
||||||
parser.add_argument('action',choices=['upload-agent','upload-lib-tests','upload-bin-tests','upload-installer','install','install-after-nonstart','probe','test-lib','test-bin'])
|
parser.add_argument('action',choices=['upload-agent','upload-lib-tests','upload-bin-tests','upload-acl-tests','upload-installer','upload-state-probe','install','install-after-nonstart','passive-acceptance','probe','test-lib','test-bin','test-acl'])
|
||||||
parser.add_argument('--artifact',type=Path)
|
parser.add_argument('--artifact',type=Path)
|
||||||
args=parser.parse_args()
|
args=parser.parse_args()
|
||||||
if args.action.startswith('upload-'):
|
if args.action.startswith('upload-'):
|
||||||
if args.artifact is None: parser.error('--artifact required')
|
if args.artifact is None: parser.error('--artifact required')
|
||||||
name={'upload-agent':'rmm-agent-windows.exe','upload-lib-tests':'windows-tests-lib.exe','upload-bin-tests':'windows-tests-bin.exe','upload-installer':'Install-PassiveClient.ps1'}[args.action]
|
name={'upload-agent':'rmm-agent-windows.exe','upload-lib-tests':'windows-tests-lib.exe','upload-bin-tests':'windows-tests-bin.exe','upload-acl-tests':'windows-tests-acl.exe','upload-installer':'Install-PassiveClient.ps1','upload-state-probe':'PassiveStateProbe.exe'}[args.action]
|
||||||
result=upload(args.artifact,name)
|
result=upload(args.artifact,name)
|
||||||
print(json.dumps(result))
|
print(json.dumps(result))
|
||||||
elif args.action in ('install','install-after-nonstart'):
|
elif args.action in ('install','install-after-nonstart'):
|
||||||
@@ -156,6 +146,35 @@ def main():
|
|||||||
record(checkpoint+'.enrollment-token-hash.json',{'token_sha256':hashlib.sha256(material['token'].encode()).hexdigest(),'one_use':True})
|
record(checkpoint+'.enrollment-token-hash.json',{'token_sha256':hashlib.sha256(material['token'].encode()).hexdigest(),'one_use':True})
|
||||||
result=powershell(script,{'sha256':artifact['sha256'],'token':material['token'],'ca':material['ca']},timeout=90,remote_signed=args.action=='install-after-nonstart')
|
result=powershell(script,{'sha256':artifact['sha256'],'token':material['token'],'ca':material['ca']},timeout=90,remote_signed=args.action=='install-after-nonstart')
|
||||||
record('installed.json',result);print(json.dumps(result))
|
record('installed.json',result);print(json.dumps(result))
|
||||||
|
elif args.action=='passive-acceptance':
|
||||||
|
import cloud_mvp_acceptance as cloud
|
||||||
|
import remote_client_bootstrap as bootstrap
|
||||||
|
identity=contract.protected_json(EVIDENCE/'service-initial-state.json')['identity']
|
||||||
|
backend=cloud.Backend()
|
||||||
|
first=backend.call('inventory.get_device',{'tenant_id':cloud.TENANT,'asset_id':identity['asset_id']})
|
||||||
|
contract.require(first['presence']=='online' and first['source_id']=='windows.base' and first['inventory'] is not None,'native_windows_inventory_required')
|
||||||
|
contract.require(set(first['capabilities'])=={'windows.base/1','heartbeat/1'} and first['inventory']['root_available_inodes'] is None,'honest_passive_capabilities')
|
||||||
|
deadline=time.monotonic()+75
|
||||||
|
while True:
|
||||||
|
current=backend.call('inventory.get_device',{'tenant_id':cloud.TENANT,'asset_id':identity['asset_id']})
|
||||||
|
if current['last_contact_at']!=first['last_contact_at']:break
|
||||||
|
contract.require(time.monotonic()<deadline,'second_fresh_heartbeat_missing')
|
||||||
|
time.sleep(2)
|
||||||
|
contract.require(current['agent_id']==identity['agent_id'] and current['presence']=='online' and current['observed_at']==first['observed_at'],'same_persisted_identity_and_inventory')
|
||||||
|
foreign=cloud.Backend('b')
|
||||||
|
denied=[]
|
||||||
|
for tenant in (cloud.TENANT,'22222222-2222-4222-8222-222222222222'):
|
||||||
|
foreign.sequence+=1
|
||||||
|
response=foreign.request({'jsonrpc':'2.0','id':foreign.sequence,'method':'tools/call','params':{'name':'inventory.get_device','arguments':{'tenant_id':tenant,'asset_id':identity['asset_id']}}})
|
||||||
|
data=response.get('data',{})
|
||||||
|
result=data.get('result',{})
|
||||||
|
contract.require('error' in data or result.get('isError'),'foreign_windows_inventory_must_be_denied')
|
||||||
|
denied.append({'tenant':tenant,'denied':True})
|
||||||
|
gate=bootstrap.rpc('server.conf',cloud.server,{'kind':'gate','tenant_id':cloud.TENANT,'agent_id':identity['agent_id']})
|
||||||
|
contract.require(gate=={'jobs':0,'outbox':0,'permits':0,'unresolved':0},'passive_agent_zero_jobs_required')
|
||||||
|
report={'first':first,'second':current,'foreign_denied':denied,'gate':gate,'native_windows':True,'server':'discovery.ease-technologies.de','no_jobs_or_approvals':True}
|
||||||
|
record('passive-acceptance.json',report)
|
||||||
|
print(json.dumps({'native_windows':True,'source_id':current['source_id'],'two_fresh_heartbeats':True,'foreign_denied':len(denied),'gate':gate,'same_identity':True}))
|
||||||
elif args.action=='probe':
|
elif args.action=='probe':
|
||||||
artifact=contract.protected_json(EVIDENCE/'rmm-agent-windows.exe.latest.json')
|
artifact=contract.protected_json(EVIDENCE/'rmm-agent-windows.exe.latest.json')
|
||||||
result=powershell(PROBE,{'sha256':artifact['sha256']},timeout=60);record('native-probe-'+artifact['sha256']+'.json',result)
|
result=powershell(PROBE,{'sha256':artifact['sha256']},timeout=60);record('native-probe-'+artifact['sha256']+'.json',result)
|
||||||
@@ -163,7 +182,12 @@ def main():
|
|||||||
else:
|
else:
|
||||||
kind=args.action.removeprefix('test-')
|
kind=args.action.removeprefix('test-')
|
||||||
artifact=contract.protected_json(EVIDENCE/('windows-tests-'+kind+'.exe.latest.json'))
|
artifact=contract.protected_json(EVIDENCE/('windows-tests-'+kind+'.exe.latest.json'))
|
||||||
result=powershell(TEST,{'kind':kind,'sha256':artifact['sha256']},timeout=120)
|
access=contract.protected_json(ROOT/'credentials/windows-dev-access.json')
|
||||||
|
command=REMOTE+'\\'+artifact['sha256']+'\\windows-tests-'+kind+'.exe --test-threads=1'
|
||||||
|
native=subprocess.run(access['ssh_prefix']+[command],capture_output=True,timeout=60)
|
||||||
|
summary=[line for line in native.stdout.decode('utf-8',errors='replace').splitlines() if line.startswith('test result: ')]
|
||||||
|
contract.require(len(summary)==1,'native_test_summary_required')
|
||||||
|
result={'exit_code':native.returncode,'native_execution':True,'artifact_sha256':artifact['sha256'],'summary':summary[0]}
|
||||||
record(args.action+'.json',result);print(json.dumps(result))
|
record(args.action+'.json',result);print(json.dumps(result))
|
||||||
if result['exit_code']!=0:raise RuntimeError('NATIVE_WINDOWS_TEST_FAILED')
|
if result['exit_code']!=0:raise RuntimeError('NATIVE_WINDOWS_TEST_FAILED')
|
||||||
|
|
||||||
|
|||||||
+19
-11
@@ -1,16 +1,24 @@
|
|||||||
# Übergabe / Entwicklungspause — 2026-11-12
|
# Übergabe / Entwicklungspause — 2026-11-12
|
||||||
|
|
||||||
**Aktueller Arbeitsstand 2026-11-13:** Ein neuer separat WebUI-genehmigter
|
**Aktueller Arbeitsstand 2026-11-13:** Windows-Passivstrecke auf tatsächlichem
|
||||||
signierter APT-Versuch lief bis Hook armed / APT 0, Nachprüfung jedoch
|
Gast bestanden: LocalService, Enrollment/mTLS/WSS, gespeichertes Inventar,
|
||||||
`DPKG_INCONSISTENT`; gespeicherte Logs Fixture1.0 nur unpacked, kein Configure.
|
zwei Heartbeats, Tenant-B-Verweigerung und sieben native Tests. Native SQLite-
|
||||||
**unknown**, Sharedledger9/1unresolved, zentrale13/13/12, keine Acceptance.
|
Probe Integrität ok, gleiche Identität, 0 ausstehende Inventarereignisse. Migration
|
||||||
Originalmarker/History sowie eigener Retrymarker erhalten. Keine weiteren
|
0013 nativ auf endgültigem Server angewendet, RLS/FKs/alte Beobachtungen erhalten.
|
||||||
Paketjobs/Reparaturen/Markerresets. Rootpolicy geschlossen; signierter Abgleich
|
Windows ohne Jobexecutor, unsignierter Entwicklungsbuild, übrige Grenzen in
|
||||||
und begrenzte Configure-Korrektur offen. Windows-native Probe bestanden,
|
`deploy/windows/CLIENT.md` und `docs/platform-support.md`.
|
||||||
LocalService/mTLS/Heartbeat online; Inventar durch alten SQL-Scopecheck blockiert.
|
|
||||||
Identitäten/Journale erhalten; additive Windowsmigration als nächster Schritt.
|
APT bleibt **unknown**: gespeicherter Lauf Hook armed/APT 0, Fixture1.0 nur
|
||||||
Neueste genaue Nachweise oben in `implementation-status.md`. Ältere Abschnitte
|
unpacked, kein Configure/Acceptance. Ledger 9 / 1 unresolved, Zentrale 13/13/12/1,
|
||||||
sind abgeschlossene historische Snapshots.
|
Originalmarker/History + eigener Retrymarker erhalten. Rootpolicy geschlossen,
|
||||||
|
keine weiteren Paketjobs/Reparaturen/Resets. Configure-Korrektur ausschließlich
|
||||||
|
lokal nachgewiesen (67 Python-Tests, echtes APT2.6.2 mit simulierendem dpkg),
|
||||||
|
**nicht auf Cloud installiert**. Cloudprovider weiterhin 465ac5ed…, neue Source
|
||||||
|
3977c2c0…; Pins nicht vermischen. Signierter prüfender Abgleich und begrenzter
|
||||||
|
neuer UI-Wiederherstellungsplan erforderlich. Servermigration bewahrte die
|
||||||
|
exakten Unknown-Nachweise/Zähler vor/nach Neustart. Details oben in
|
||||||
|
`implementation-status.md`. Nachweise/Quellen nach jedem Schritt gepusht;
|
||||||
|
private Daten gitignoriert. Ältere Abschnitte sind historische Snapshots.
|
||||||
|
|
||||||
**Aktueller Folgestand 2026-11-13:** APT-100-Ursache durch separat WebUI-genehmigte
|
**Aktueller Folgestand 2026-11-13:** APT-100-Ursache durch separat WebUI-genehmigte
|
||||||
Cloud-Diagnosen belegt: `--no-download` lieferte im echten v3-Hook `**ERROR**`
|
Cloud-Diagnosen belegt: `--no-download` lieferte im echten v3-Hook `**ERROR**`
|
||||||
|
|||||||
@@ -1,5 +1,49 @@
|
|||||||
# Tatsächlicher Implementierungsstand
|
# Tatsächlicher Implementierungsstand
|
||||||
|
|
||||||
|
## Windows-Passivstrecke auf tatsächlichem Gast abgenommen — 2026-11-13
|
||||||
|
|
||||||
|
Additive Migration 0013 nach erneutem tatsächlichem ARM64-Serverbuild und
|
||||||
|
erfolgreichem Migratorlauf auf endgültigem Cloudserver angewendet. Sie erlaubt
|
||||||
|
ausschließlich `linux.base` und `windows.base`, keine beliebigen Quelllabels.
|
||||||
|
Die ursprüngliche Windows-Inventarnachricht wurde aus dem dauerhaften Journal
|
||||||
|
erneut zugestellt und gespeichert: ursprüngliche Erhebungszeit erhalten,
|
||||||
|
Empfangszeit separat; Quelle `windows.base`, native Windowsdaten und Inodes
|
||||||
|
`null`. Kein Neuerheben als vermeintlicher Replaybeleg, kein Identitätsreset.
|
||||||
|
|
||||||
|
Tatsächlich bestätigt: SCM-Dienst **LocalService / Prozessowner S-1-5-19**,
|
||||||
|
Enrollment und ausgehendes mTLS/WSS zum endgültigen Server, gespeichertes
|
||||||
|
Inventar, zwei verschiedene frische Heartbeats und `online`. Mandant B sah
|
||||||
|
weder über A-Kontext noch eigene Mandantensicht das fremde Asset. Windows-
|
||||||
|
Gerät **0 Jobs / 0 Outbox / 0 Grants / 0 offene Versuche**; dies ist passive
|
||||||
|
Standardtelemetrie und keine Jobfreigabe. Zusätzliche native Readonly-
|
||||||
|
SQLite-Prüfung: Integrität ok, gleiche Geräteidentität, **0 ausstehende
|
||||||
|
Inventarereignisse** nach konkretem ACK.
|
||||||
|
|
||||||
|
**Sieben native Windows-Rusttests bestanden**: drei Transport-/Namensguards,
|
||||||
|
drei Bibliothekstests mit echtem Win32-Inventar, unabhängigen stabilen CIM-
|
||||||
|
Bootabfragen, Journal-Reopen/Sequenz/Prozesssperre/ACK/Identitätsbindung sowie
|
||||||
|
ein ACL-Integrationstest. Dieser prüft korrekte ACLs und verweigert breite/
|
||||||
|
NULL-DACLs, falschen Pfadtyp und Reparse-Points ausschließlich auf neuen
|
||||||
|
nichtgeheimen Tempfixtures. Windows-target Alltargets-Clippy mit `-D warnings`
|
||||||
|
bestanden. Eigener Buildcontainer entfernt.
|
||||||
|
|
||||||
|
Frischer isolierter PostgreSQL-Test aller Migrationen 1–13 bestand: bestehende
|
||||||
|
Linuxzeile bytegleich, Windows erlaubt, beliebiger Scope verweigert, Tenant-/
|
||||||
|
Missing-context-RLS und zusammengesetzter Geräte-FK erhalten, Null-Jobgate.
|
||||||
|
Serverwechsel prüfte **vor/nachher exakt unveränderte** vorhandene APT-Kontexte,
|
||||||
|
Marker, Loghashes, Ledger-Outcomes und zentrale Zähler **13/13/12/1**. Derselbe
|
||||||
|
Linux-Versuch bleibt unknown, Rootpolicy geschlossen; keine Freigabe/Entsperrung
|
||||||
|
durch Migration oder Serverneustart.
|
||||||
|
|
||||||
|
**Grenzen:** unsignierter Windows-Entwicklungsbuild, kein Jobexecutor/Helper,
|
||||||
|
native Windows-HTTPS-/Rotation-/Installer-/Paketabnahme offen. Registry liefert
|
||||||
|
auf dem unabhängig als Windows 11 bestätigten Gast den Legacy-Produktnamen
|
||||||
|
„Windows 10 Pro“; dieser Rohwert wird sichtbar erhalten, keine erfundene
|
||||||
|
Marketingnormalisierung. Detailquellen und Abnahmekontext:
|
||||||
|
`deploy/windows/CLIENT.md`; [Plattformmatrix](platform-support.md).
|
||||||
|
Private Belege unter `devstate/windows-client/` und
|
||||||
|
`devstate/server-upgrades/*.unknown-preserved.json`.
|
||||||
|
|
||||||
## APT-Unpack-only-Ursache lokal korrigiert, Cloud weiter gesperrt — 2026-11-13
|
## APT-Unpack-only-Ursache lokal korrigiert, Cloud weiter gesperrt — 2026-11-13
|
||||||
|
|
||||||
Feste APT-Konfiguration ergänzt um
|
Feste APT-Konfiguration ergänzt um
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Tatsächlich geprüfte Plattformen
|
||||||
|
|
||||||
|
Stand 2026-11-13 · Spezifikation 1.9. Dies ist eine Entwicklungsmatrix,
|
||||||
|
keine Produktionsfreigabe. Build, native Teilabnahme und vollständige MVP-Abnahme
|
||||||
|
sind getrennt; Notebook-Host ausschließlich Entwicklungsrechner ohne Agent.
|
||||||
|
|
||||||
|
| Ziel | Build | Tatsächlicher nativer Nachweis | Offene Grenzen |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Ubuntu 24.04 x86-64, Cloud-Linux-Client | Rust 1.99.1, GNU/glibc, Bookworm-Buildbasis | systemd-Agent, mTLS/WSS und HTTPS, Inventar/Heartbeat, WebUI-genehmigte Skript-/Rootdienststrecke; APT-Sandbox/Hook | Linux-MVP nicht abgenommen. Aktueller APT-Versuch unknown: Fixture 1.0 entpackt, nicht konfiguriert; keine Acceptance/Upgrade-/Noopfreigabe. Weitere Fehler-/Recoveryabnahmen offen. |
|
||||||
|
| Windows 11 Pro, Build 26300, x86-64, eigener Gast | `x86_64-pc-windows-gnu` Crossbuild Debug/Release und Clippy bestanden | LocalService/Service-SID, Enrollment, ausgehendes mTLS/WSS, gespeichertes `windows.base`, zwei frische Heartbeats, Tenant-B-Verweigerung; sieben native Tests, konkrete Inventar-ACKs | Unsignierter Entwicklungsbuild. Kein Jobexecutor/Helper/PowerShell-/Paketpfad. HTTPS, Rotation/Widerruf, MSI/EXE, signierter Installer und Rebootpersistenz noch nicht nativ abgenommen. Registry-Produktname meldet noch den tatsächlichen Legacywert „Windows 10 Pro“; unabhängige CIM-Probe bestätigt Windows 11. |
|
||||||
|
| Windows MSVC-Ziel | Geplant | Nicht ausgeführt | GNU-Build/-Lauf ist kein MSVC-Nachweis. |
|
||||||
|
| ARM64-Agenten, weitere Windows-/Linux-Versionen | Nicht freigegeben | Keine entsprechende native Agentabnahme | Keine Supportableitung aus einem Compilerziel oder ARM64-Server. |
|
||||||
|
| Ubuntu 26.04 ARM64, dedizierter Cloudserver | Native ARM64-Serverbuilds bestanden | API/Gateway/PostgreSQL, Migrationen 1–13 und Clientverbindungen auf `discovery.ease-technologies.de` | Öffentliche WebUI/OIDC und Produktionsbetrieb nicht abgenommen; Verwaltungs-UI nur über SSH-Tunnel. Kein ARM64-Agentnachweis. |
|
||||||
|
|
||||||
|
Windows verwendet denselben Domain-/Protobuf-/TLS-Vertrag; passive Beobachtungen
|
||||||
|
benötigen keine Einzelgenehmigung. Jeder künftige Ausführungsjob braucht den
|
||||||
|
unveränderlichen Plan und WebUI-Genehmigung. Keine eigene Desktop-Engine,
|
||||||
|
RustDesk aus dieser Umsetzung ausgelassen; PVE/PBS/Cluster bleiben nachgelagert.
|
||||||
|
|
||||||
|
Genaue Tests, Artefakthashes und Grenzen:
|
||||||
|
[Implementierungsstand](implementation-status.md),
|
||||||
|
[Windows-Client](../deploy/windows/CLIENT.md),
|
||||||
|
[Server](server-deployment.md).
|
||||||
@@ -4,6 +4,15 @@ Stand: 2026-11-13 · Spezifikation 1.9 · Linux-MVP weiterhin nicht abgenommen.
|
|||||||
|
|
||||||
## Neuester APT-/Bootstrapstand
|
## Neuester APT-/Bootstrapstand
|
||||||
|
|
||||||
|
**Abgeschlossene Windows-Passivstrecke:** Migration 13 auf Cloudserver angewendet,
|
||||||
|
Windows-11-Gast als LocalService mit mTLS/WSS, gespeichertem Inventar, zwei
|
||||||
|
Heartbeats, Tenant-B-Verweigerung und sieben nativen Tests bestätigt. Null
|
||||||
|
Windows-Jobs/Outbox/Grants. Exakte APT-Unknown-Evidenz und 13/13/12/1 beim
|
||||||
|
Serverwechsel erhalten. Rootpolicy geschlossen; Configure-Korrektur nur lokal,
|
||||||
|
kein neuer Paket-/Recoverylauf. Aktuelle Plattformmatrix: `platform-support.md`.
|
||||||
|
Die folgenden Meldungen sind vorherige Zwischenstände.
|
||||||
|
|
||||||
|
|
||||||
**Neuester Versuch:** Hook armed/APT 0, aber Fixture 1.0 laut gespeicherten Logs
|
**Neuester Versuch:** Hook armed/APT 0, aber Fixture 1.0 laut gespeicherten Logs
|
||||||
nur unpacked, Nachprüfung `DPKG_INCONSISTENT`, Ergebnis **unknown**. Ledger9/1
|
nur unpacked, Nachprüfung `DPKG_INCONSISTENT`, Ergebnis **unknown**. Ledger9/1
|
||||||
unresolved, zentrale13/13/12; Rootpolicy geschlossen, kein weiterer Paketversuch.
|
unresolved, zentrale13/13/12; Rootpolicy geschlossen, kein weiterer Paketversuch.
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
-- Add only the independently validated Windows passive snapshot scope.
|
||||||
|
-- Existing observations, tenant RLS, composite identity foreign keys and sequence
|
||||||
|
-- uniqueness remain intact; an arbitrary source label is still rejected.
|
||||||
|
ALTER TABLE observations DROP CONSTRAINT observations_source_id_check;
|
||||||
|
ALTER TABLE observations ADD CONSTRAINT observations_source_id_check
|
||||||
|
CHECK (source_id IN ('linux.base', 'windows.base'));
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Real isolated PostgreSQL migration test, without ports, agents or RMM jobs."""
|
||||||
|
from pathlib import Path
|
||||||
|
import subprocess
|
||||||
|
import time
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
ROOT=Path(__file__).resolve().parents[1]
|
||||||
|
NAME='rmm-windows-migration-'+uuid.uuid4().hex[:10]
|
||||||
|
|
||||||
|
|
||||||
|
def command(args,input=None,ok=True):
|
||||||
|
result=subprocess.run(args,input=input,capture_output=True,timeout=40)
|
||||||
|
if ok and result.returncode:raise RuntimeError('ISOLATED_POSTGRES_CHECK_FAILED: '+result.stderr.decode(errors='replace')[:500])
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
def sql(text,ok=True):
|
||||||
|
return command(['docker','exec','-i',NAME,'psql','-X','-qAt','-v','ON_ERROR_STOP=1','-U','postgres'],text.encode(),ok)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
command(['docker','run','-d','--network','none','--name',NAME,'-e','POSTGRES_HOST_AUTH_METHOD=trust','postgres:17.6-bookworm'])
|
||||||
|
try:
|
||||||
|
for _ in range(100):
|
||||||
|
logs=command(['docker','logs',NAME],ok=False)
|
||||||
|
if b'init process complete' in logs.stdout and command(['docker','exec',NAME,'pg_isready','-U','postgres'],ok=False).returncode==0:break
|
||||||
|
time.sleep(.2)
|
||||||
|
else:raise RuntimeError('ISOLATED_POSTGRES_NOT_READY')
|
||||||
|
sql('CREATE ROLE rmm_app;')
|
||||||
|
paths=sorted((ROOT/'migrations').glob('*.sql'))
|
||||||
|
assert len(paths)==13
|
||||||
|
for path in paths[:-1]:sql(path.read_text())
|
||||||
|
a='11111111-1111-4111-8111-111111111111';b='22222222-2222-4222-8222-222222222222'
|
||||||
|
asset=str(uuid.uuid4());agent=str(uuid.uuid4());boot=str(uuid.uuid4());snapshot=str(uuid.uuid4())
|
||||||
|
sql(f"INSERT INTO assets(tenant_id,asset_id) VALUES('{a}','{asset}'); INSERT INTO agent_installations(tenant_id,agent_id,asset_id,certificate_sha256) VALUES('{a}','{agent}','{asset}','{'a'*64}');")
|
||||||
|
def observation(scope,tenant=a,sequence=1):
|
||||||
|
return f"INSERT INTO observations(tenant_id,agent_id,message_id,boot_id,sequence,observed_at,source_id,quality,completeness,snapshot_id,data,payload_sha256) VALUES('{tenant}','{agent}','{uuid.uuid4()}','{boot}',{sequence},now(),'{scope}','valid','partial','{snapshot}','{{}}','{'b'*64}');"
|
||||||
|
sql(observation('linux.base'))
|
||||||
|
before=sql('SELECT row_to_json(o) FROM observations o;').stdout
|
||||||
|
assert sql(observation('windows.base',sequence=2),ok=False).returncode!=0
|
||||||
|
sql('BEGIN;'+paths[-1].read_text()+'COMMIT;')
|
||||||
|
assert sql('SELECT row_to_json(o) FROM observations o;').stdout==before
|
||||||
|
sql(observation('windows.base',sequence=2))
|
||||||
|
assert sql(observation('arbitrary.base',sequence=3),ok=False).returncode!=0
|
||||||
|
assert sql(f"SET ROLE rmm_app; SET app.tenant_id='{a}'; SELECT count(*) FROM observations;").stdout.strip()==b'2'
|
||||||
|
assert sql(f"SET ROLE rmm_app; SET app.tenant_id='{b}'; SELECT count(*) FROM observations;").stdout.strip()==b'0'
|
||||||
|
assert sql('SET ROLE rmm_app; SELECT count(*) FROM observations;').stdout.strip()==b'0'
|
||||||
|
assert sql(f"SET ROLE rmm_app; SET app.tenant_id='{b}';"+observation('windows.base',tenant=b,sequence=3),ok=False).returncode!=0
|
||||||
|
assert sql('SELECT relrowsecurity FROM pg_class WHERE oid=\'observations\'::regclass;').stdout.strip()==b't'
|
||||||
|
assert sql('SELECT (SELECT count(*) FROM jobs)+(SELECT count(*) FROM outbox)+(SELECT count(*) FROM execution_permits);').stdout.strip()==b'0'
|
||||||
|
print('PASS: migrations 1–13 on fresh PostgreSQL; old rows byte-preserved; Windows accepted; arbitrary scope rejected; tenant/missing-context RLS and composite identity FK retained; zero jobs/outbox/grants.')
|
||||||
|
finally:
|
||||||
|
command(['docker','rm','-f',NAME],ok=False)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__=='__main__':main()
|
||||||
@@ -18,6 +18,21 @@ is not deployed or natively accepted on the Cloud VM.** No automatic repair,
|
|||||||
marker reset or implicit unknown-resolution is introduced. Older sections below
|
marker reset or implicit unknown-resolution is introduced. Older sections below
|
||||||
describe historical increments; current operational status is the linked log.
|
describe historical increments; current operational status is the linked log.
|
||||||
|
|
||||||
|
Reproduce that **local** configure regression using the existing development
|
||||||
|
image with APT 2.6.2 (no host APT command):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker run --rm --read-only --network none --user 1000:1000 \
|
||||||
|
--tmpfs /tmp:rw,exec,nosuid,nodev,mode=1777 \
|
||||||
|
--tmpfs /tmp/opencode:rw,exec,nosuid,nodev,mode=1777 \
|
||||||
|
-v "$PWD/tools/apt-transaction:/src/tools/apt-transaction:ro" \
|
||||||
|
-v "$PWD/tests/apt_transaction:/src/tests/apt_transaction:ro" \
|
||||||
|
-v "$PWD/deploy/linux:/src/deploy/linux:ro" -w /src \
|
||||||
|
-e PYTHONDONTWRITEBYTECODE=1 -e RMM_APT_ARGUMENT_REGRESSION=1 \
|
||||||
|
rust-discovery-dev-build:local \
|
||||||
|
python3 -m unittest discover -s tests/apt_transaction -p 'test_*.py' -q
|
||||||
|
```
|
||||||
|
|
||||||
Current dedicated runner/probe/profile/agent integration and executed local
|
Current dedicated runner/probe/profile/agent integration and executed local
|
||||||
checks: [`../../deploy/linux/apt-helper-README.md`](../../deploy/linux/apt-helper-README.md).
|
checks: [`../../deploy/linux/apt-helper-README.md`](../../deploy/linux/apt-helper-README.md).
|
||||||
The general helper unit remains unchanged; actual native VM measurements are
|
The general helper unit remains unchanged; actual native VM measurements are
|
||||||
|
|||||||
Reference in New Issue
Block a user