Open jvanderhoof opened 6 years ago
This bug is over 2 years old, Closing
@dataplex, @whip113 - I've been looking into this issue today. I have a potential fix, but it skirts a design issue: a host factory token can enroll a created host into multiple layers.
My solution prepends the first layer's id to the created host's id, which meets the above issue's Expected Results
. A couple of questions to the two of you:
Is host-factory still supported? I mean it stays in the documentationt, but other than that it seems dead. Even puppet module (where use of host factory makes some sence) does not support it any more https://github.com/cyberark/conjur-puppet.
When a host is created using a host factory, the host does not include the inherited policy in its ID. This means adding a host (
host-1
) in the layerstaging/myapp
creates a hosthost-1
rather thanstaging/myapp/host-1
as would be expected.Steps to Replicate:
Start Conjur: https://github.com/conjurdemos/conjur-intro
Load policy:
Now we have a layer (
staging/myapp
) in in thestaging
namespace calledmyapp
, with a Host Factory.Create a HF Token from this Host Factory:
Grab the host factory token (ex. 37y7fja5dngtkzgdkm230r8qk325e8bnekwwqev37408jpw4te8k) from the above response.
Generate a new host
host-2
using the previous HF Token:Result A host is created
host-2
, which is correctly owned by thestaging/myapp
layer.Expected Results The host is created using layer's policy:
staging/myapp/host-2
.