Organize device inventory by customer and restrict token access to its audience

This commit is contained in:
2026-11-17 21:55:24 +01:00
parent aeb9adc649
commit 0afaca1d64
39 changed files with 1950 additions and 225 deletions
+3 -1
View File
@@ -39,6 +39,8 @@ def main():
ALTER SCHEMA public OWNER TO rmm_migrator;""")
for path in sorted((ROOT / "migrations").glob("*.sql")):
sql("rmm_migrator", path.read_text())
sql("postgres", (ROOT / "tests/customer_access.sql").read_text())
print("PASS selected, global and future customer grants, role boundaries, revocation and tenant context")
test_command = [
"docker", "run", "--rm", "--network", "container:" + name,
"--read-only", "--tmpfs", "/tmp:rw,size=512m",
@@ -50,7 +52,7 @@ def main():
"--entrypoint", "cargo", "rust-discovery-windows-tls-full:local",
"test", "--locked", "--offline", "-p", "rmm-server",
]
for test_filter in ("local_auth::tests", "mcp_tokens::tests"):
for test_filter in ("local_auth::tests", "mcp_tokens::tests", "devices::tests"):
output = command([*test_command, test_filter, "--", "--include-ignored", "--nocapture"], timeout=300)
print(output.decode())
print("PASS all migrations under NOSUPERUSER/NOBYPASSRLS owner; local MFA and MCP tests in isolated PostgreSQL")