In my cf-serverd's promises.cf I have a bundle like
bundle server host_rules(key, host) {
access:
"/srv/cfengine3/$(host)"
admit_keys => { "$(key)" };
}
I tried to instanciate it with
body common control {
bundlesequence =>
{
generic_rules,
host_rules("MD5=362c5fcf568b492f78ae392229299c05", "foo.example.com"),
};
}
But (with cfengine-3.8.1) this does not seem to have an effect. E.g. cf-serverd -v
reports only the access rules in the generic_rules
bundle and an access to foo.example.com's files is refused.
generic_rules
(which is a simple bundle server generic_rules { ... }
bundle) seems to be evaluated when not listed the common bundlesequence
.
How can I expand the host_rules
bundle in the cf-serverd setup?
EDIT:
I intent to give access to some directories only to a corresponding host which is identified by its key. I know that it is possible to use $(connection.key)
in the pathname but dislike it because
it is unreadable (having dozens of directories with meaningless
MD5=...
names makes it difficulty to find the directory belonging to 'foo.example.com')it creates trouble when client key changes (e.g. because it was compromised or because host will be reinstalled). 'git' (which is used to organize my cfengine rules) does not support renaming of files/directories and I would lose history of changes with 'git mv'.