How can I concatenate Conjur policy files together?

Does anybody know how to concatenate policy files together and load them successfully? For example, given a have a users.yml policy, a groups.yml policy, a grants.yml policy and a policy_tree.yml policy, if I try cat users.yml groups.yml, grants.yml and policy_tree.yml | conjur policy load root - I get an unprocessable entity error 422. If I load all of those policies individually in the order above, they load fine.

@John, cat is going to concatenate those files together alphabetically, which means your users.yml is going to come too late in the stream. What I do is number the policy files in the order I wish them to be loaded, then load them by cat $(ls -A) | conjur policy load --replace root -.

1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.