server
server copied to clipboard
BUG: There are many authorizationPolicies without credentialRules
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to any env and perform the following query:
SELECT * FROM alkemio.authorization_policy where credentialRules like ''
- Depending on the amount of data there are different amount of authorization policies, that don't have credentialRules.
I.e. for dev env: 574
for prod are a couple of thousands
Expected behavior Authorization policy rest sets correct credentialRules to all authorizationPolicies.
Additional information
The impact of missing credentialRules could result in side effects like, no privilege to read, write, etc..
After cleaning orphans:
These tables have such credential rules and number of issues after pruning is total 1873:
- document - 57
- innovation_flow - 13
- profile - 13
- storage_aggregator - 10
- storage_bucket - 1738
- tagset - 29
- visual - 13
This might be caused with merging the account branch. I have noticed a lot more authorization orphan data when running the pruning script.
@alstojanovic This is on production. @valentinyanakiev lets use this issue.
So a bit of a context - the creation of one user, and many document on a whiteboard have created auth policies without credential rules. The auth reset fixed the documents, but it will keep happening with each creation and potentially with a reset, because they use the same code path.