-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration after 5.1.0 release #6596
Comments
Okay i find out issue Setup work fine on docker compose since it uses postgres admin by default. And look like ( from docs ) postgres admin has permission bypass rls stuff =\ same as admin on aws rds. BYPASSRLS as role not available in aws rds ( do not test in local setup ) but for security purpose may i ask to have a look on this problem :) |
Hi @plejik, Thank you very much for all the description and the steps followed, we are going to investigate this more in depth and we will test with RDS for possible problems like this one, thank you very much for the help, as soon as possible we will start testing. |
I would add some additional description, latest user config ( i just give up at some point ) i provide similar access to prowler and prowler_admin ( which is incorect but try to figure out what i am do wrong )
And for some reason in dbviewer i see completly diff output for select ( for example roles table)
and admin can select less info that prowler ( for example for prowler_admin table empty but for prowler user i see role there ) |
Okay i find out temp solution until main fix will be figured out. So main issue still appear - prowler_admin user do not use RLS postgresql stuff that why it failed.?
I do not work recently with postgresql and forgot some stuff with user and roles here :) |
Thank you very much for the temporary solution, this will be very useful to solve this problem in future versions, as soon as possible we will start testing to implement a solution to this problem with the 0005 migration. |
Steps to Reproduce
Hey!
Run prowler on k8s eks + rds as database
Update v 5.0.5 to 5.1.0 ( and 5.1.3 as well)
Face problem when run command
poetry run python manage.py migrate --database admin
I got error
django.db.utils.ProgrammingError: new row violates row-level security policy for table "roles"
What i findout that we have policy
after migration 0004 we run migration 0005 but i do not see middlware which ( i may not find out proper code sorry ) set tenant_id.
But find out something similar in
src/backend/api/decorators.py: cursor.execute(SET_CONFIG_QUERY, [POSTGRES_TENANT_VAR, tenant_id])
Could it be related issue for migration
Thx for help
Expected behavior
Migration should run without error
Actual Result with Screenshots or Logs
The text was updated successfully, but these errors were encountered: