-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Be more strict with access resource titles / ACL syntax #324
Conversation
0c68141
to
b2c1130
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noting that the type aliases need some simple tests.
3dc0735
to
7bd61bb
Compare
The openldap_access resource allows a lot of variations in the title for declaring a resource, making it possible to skip passing parameters such as `what` and `suffix`. This flexibility however can confuse Puppet when it is prefetching resources, leading to catalog compilation failures. Impose a more strict format for resource titles, and validate it with tighter custom types to raise a hopefully meaningful error instead of a Ruby error because something borked bad.
I rebased these changes on top of master, squashed the minor fixes that where added part of previous reviews, and added a new commit to address the final issue that worried me with this change. Can I have a review please? |
The role of these rumbers was to allow multiple ACL with the same `to` to not overwrite each other when placed into the same hash. They have no further purpose and do not really avoid the issue since one can reuse the number. Rework the expected data structure to allow constructs that do not allow such misconfiguration.
@@ -10,35 +10,64 @@ | |||
# | |||
# [*acl*] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also update this to puppet-strings soonish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this yesterday and bravely decided to go look away 😆
The openldap_access resource allows a lot of variations in the title for
declaring a resource, making it possible to skip passing parameters such
as
what
andsuffix
. This flexibility however can confuse Puppetwhen it is prefetching resources, leading to catalog compilation
failures.
Impose a more strict format for resource titles, and validate it with
tighter custom types to raise a hopefully meaningful error instead of a
Ruby error because something borked bad.
Fixes #294