You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using MySQL and Hydra 0.7.0. We add subjects to one policy frequently using the CLI: hydra policies subjects add ... Two weeks ago, we found that the subjects, resources, and actions were all gone from this policy. Since then, it had happened again.
I am suspecting that it was due to the way Hydra updates a policy by first deleting the entire policy, and then recreating it. So concurrent updates on a policy could have such a devastating effect. In addition, Ladon stores policies in 4 tables, which could explain why we lost the policy data (subjects, resources, actions) but not the policy itself.
Ideally adding or removing subjects from a policy should just update the subjects and not recreating the entire policy. A less preferred solution would be to prevent race condition on the delete/recreate operation (mutex or transaction).
The text was updated successfully, but these errors were encountered:
The problem with updating the policy is that we need to make a diff and, for example, find out which subjects were added, or which ones need to be removed. The solution to this is probably, to remove and add the policy in one transaction.
We are using MySQL and Hydra 0.7.0. We add subjects to one policy frequently using the CLI:
hydra policies subjects add ...
Two weeks ago, we found that the subjects, resources, and actions were all gone from this policy. Since then, it had happened again.I am suspecting that it was due to the way Hydra updates a policy by first deleting the entire policy, and then recreating it. So concurrent updates on a policy could have such a devastating effect. In addition, Ladon stores policies in 4 tables, which could explain why we lost the policy data (subjects, resources, actions) but not the policy itself.
Ideally adding or removing subjects from a policy should just update the subjects and not recreating the entire policy. A less preferred solution would be to prevent race condition on the delete/recreate operation (mutex or transaction).
The text was updated successfully, but these errors were encountered: