refactor: rebrand project to HartOMat
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user