-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Validate ACLs against rd-acl recommendations #139
Conversation
@jyaworski can you briefly explain what this code does? |
@igalic done. So Rundeck 2.6 introduced 'rd-acl validate' to lint and validate aclpolicy files. This changes the template to conform to those linting recommendations. What this does, essentially, is adds a hyphen only to every other line (a rule is considered an action and allow/deny statement). |
I'll admit that this isn't a good solution, as every-other line is only the most common way of specifying ACLs. A better way would have the ACLs grouped in a hash somehow, but that's a breaking change. |
Hold off on merging this. I'm going to refactor it. |
OK, now it's good to merge. I was overthinking it in my last few comments. It was already an array of hashes; no compatibility break. |
@jyaworski can we introduce a test for this? |
@igalic the validate_acl function is kind of like a test for this already. Were you meaning something else? |
I'm holding on this until #134 gets merged. |
This commit changes the ACL template formatting. The 'rd-acl validate' tool introduced in Rundeck 2.6 gave formatting recommendations over the previous template.
Okay. This is good to be merged. |
@jyaworski can you squash? |
I rebased down into one commit; did you mean something else? |
Validate ACLs against rd-acl recommendations
Thanks! |
Validates against RD 2.6's rd-acl validate.
@liamjbennett