Skip to content
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

Merged
merged 1 commit into from
Oct 18, 2015
Merged

Validate ACLs against rd-acl recommendations #139

merged 1 commit into from
Oct 18, 2015

Conversation

jyaworski
Copy link
Member

Validates against RD 2.6's rd-acl validate.

@liamjbennett

@igalic
Copy link
Contributor

igalic commented Oct 13, 2015

@jyaworski can you briefly explain what this code does?
perhaps amend the commit message too ;)

@jyaworski
Copy link
Member Author

@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).

@jyaworski
Copy link
Member Author

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.

http://rundeck.org/2.6.0/man5/aclpolicy.html#type-rules

@jyaworski
Copy link
Member Author

Hold off on merging this. I'm going to refactor it.

@jyaworski
Copy link
Member Author

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 jyaworski changed the title This commit causes the generated template to validate Validate ACLs against rd-acl recommendations Oct 13, 2015
@igalic
Copy link
Contributor

igalic commented Oct 14, 2015

@jyaworski can we introduce a test for this?

@jyaworski
Copy link
Member Author

@igalic the validate_acl function is kind of like a test for this already. Were you meaning something else?

@jyaworski
Copy link
Member Author

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.
@jyaworski
Copy link
Member Author

Okay. This is good to be merged.

@nibalizer
Copy link
Member

@jyaworski can you squash?

@jyaworski
Copy link
Member Author

I rebased down into one commit; did you mean something else?

nibalizer added a commit that referenced this pull request Oct 18, 2015
Validate ACLs against rd-acl recommendations
@nibalizer nibalizer merged commit 5918014 into voxpupuli:master Oct 18, 2015
@nibalizer
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants