criteo-cookbooks / rundeck-server

Apache License 2.0
3 stars 15 forks source link

Exclamation marks in ACL policies generated from attributes #58

Closed scopenco closed 7 years ago

scopenco commented 7 years ago

Chef 13.1.31 generate wrong ACL policies based on attributes:

#
# This file is generated by Chef
#
---
description: Admin, all access.
context: !ruby/hash:Mash
  project: ".*"
for: !ruby/hash:Mash
  resource:
  - !ruby/hash:Mash
    allow: "*"
  adhoc:
  - !ruby/hash:Mash
    allow: "*"
  job:
  - !ruby/hash:Mash
    allow: "*"
  node:
  - !ruby/hash:Mash
    allow: "*"
by: !ruby/hash:Mash

The hack in aclpolicy.erb that should fix these exclamation marks doesn't work now.

Rundeck 2.8.2

error:

Can't construct a java object for tag:yaml.org,2002:com.dtolabs.rundeck.core.authorization.providers.yaml.model.ACLPolicyDoc; exception=Cannot create property=context for JavaBean=Policy{context=null, description='Admin, all access.', for=null, by=null, id='null'}; null; Can't construct a java object for !ruby/hash:Mash; exception=Invalid tag: !ruby/hash:Mash
 in "<reader>", line 5, column 1:
    description: Admin, all access.
    ^
kamaradclimber commented 7 years ago

Indeed, I'll submit a fix (unless you want to do it). Thanks for the report.