Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid duplicated policy entries #2738
How to reproduce the issue
Today we are allowing the user to redeclare a policy entry.
It will cause a false-positive behavior. then, we should verify and raise an error if exist any policy name duplicated.
It's not clear that this is incorrect behaviour, I'm pretty ambivalent... If the first entry took precedence then I'd be absolutely on the side of it being a defect, as the second entry takes precedence, then there could be some use in keeping this to allow site specific overrides, i.e. for some configurations include a local policy.d directory after the main raddb/policy.d directory. Still worth discussing to figure out what we should do.
@arr2036 we do not allow to declare the same module instance twice.
e.g: I replicate the
so, in my perspective, we should do the same behavior for policies. Based on my experience today, it was terrible to figure out that the same policy was duplicated. (I never imagined that it could be the reason)