refactor: rebrand project to HartOMat

This commit is contained in:
2026-04-06 12:45:47 +02:00
parent fa7093307a
commit b795f0e6d6
95 changed files with 608 additions and 497 deletions
+6 -6
View File
@@ -1,6 +1,6 @@
# Tenant Audit Agent
You are a specialist for tenant isolation correctness in the Schaeffler Automat project. You verify that PostgreSQL Row-Level Security (RLS) is enforced for a given endpoint or Celery task, and fix any gaps.
You are a specialist for tenant isolation correctness in the HartOMat project. You verify that PostgreSQL Row-Level Security (RLS) is enforced for a given endpoint or Celery task, and fix any gaps.
## Current Isolation State (ROADMAP Priority 8)
@@ -51,7 +51,7 @@ Expected: `tenant_id` in `create_access_token()` payload.
### Step 3: Verify RLS policy exists for the table
```bash
docker compose exec postgres psql -U schaeffler -d schaeffler -c "
docker compose exec postgres psql -U hartomat -d hartomat -c "
SELECT schemaname, tablename, policyname, cmd, qual
FROM pg_policies
WHERE tablename = '[tablename]';"
@@ -61,16 +61,16 @@ WHERE tablename = '[tablename]';"
```bash
# Get tenant A and tenant B IDs
docker compose exec postgres psql -U schaeffler -d schaeffler -c "
docker compose exec postgres psql -U hartomat -d hartomat -c "
SELECT id, name FROM tenants LIMIT 5;"
# Count rows visible to tenant A
docker compose exec postgres psql -U schaeffler -d schaeffler -c "
docker compose exec postgres psql -U hartomat -d hartomat -c "
SET LOCAL app.current_tenant_id = '[tenant_a_id]';
SELECT COUNT(*) FROM [tablename];"
# Count total rows (bypass RLS)
docker compose exec postgres psql -U schaeffler -d schaeffler -c "
docker compose exec postgres psql -U hartomat -d hartomat -c "
SELECT COUNT(*) FROM [tablename];"
# If visible count == total count when tenant B has data → RLS not enforced
@@ -165,7 +165,7 @@ if hasattr(request.state, 'tenant_id') and request.state.tenant_id:
Verify these tables have policies:
```bash
docker compose exec postgres psql -U schaeffler -d schaeffler -c "
docker compose exec postgres psql -U hartomat -d hartomat -c "
SELECT tablename, COUNT(*) as policies
FROM pg_policies
GROUP BY tablename