<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>Some excellent points, and thank you for being open to having the conversation - I know you don't have to, and it is appreciated.</div><div><br></div><div><blockquote type="cite"><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">Profiles which are allowed for a host principal (representing<br>physical or virtual machines) are not necessarily the same profiles<br>that should be used for service principals.  This is why CA ACLs<br>must be executed against the issuee principal.</span></font></blockquote></div><div><br></div><div>Certmonger uses the host credential (from the host keytab) to make all requests on behalf of all service principals of a given machine, right? So if that machine is compromised then so too are all keys/certificates issued to that machine. If I think a machine is more likely to become compromised, I'd want to lock down the Certificate Profiles available to that whole machine. Even if I end up using different profiles for different services on the same machine, I'm still forced to trust certmonger to use the right profile for each request.</div><div><br></div><div>So, e<span style="background-color: rgba(255, 255, 255, 0);">ven with future sub-CAs (this excites me btw), I'm just not sure I understand the security benefit of evaluating CA ACLs against the subject/issuee of the request, when (as you say) directory ACIs are already doing this.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div>Lets look at this from another angle. Suppose I obtain a service keytab for my unprivileged web application (say HTTP/<a href="http://myapp01.example.com">myapp01.example.com</a>), which is needed to authenticate web clients via kerberos/gssapi. The app also needs x509 certificates for TLS, which is handled by certmonger. Given the current approach of CA ACLs, it would be possible for my unprivileged web-app (if it were to become compromised) to use its service keytab to request certificates from IPA directly, which is undesirable, but I'd have no way of stopping it.</div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">I'm even more curious about how I'd explain and justify this behaviour to clients. It's confusing, you know?</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">Cheers</span></div><div><br>On 23 Mar 2016, at 09:48, Fraser Tweedale <<a href="mailto:ftweedal@redhat.com">ftweedal@redhat.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>On Tue, Mar 22, 2016 at 10:57:37PM +1100, earsdown wrote:</span><br><blockquote type="cite"><span>Hi Fraser, Martin and Alexander,</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Thanks for looking into this! For what it's worth, I think for this</span><br></blockquote><blockquote type="cite"><span>particular use case, I'm leaning more towards Alexander when he said:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>I don't think you need to group services this way. For managing</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>services, and this means being able to issue certificates/keytabs for</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>them, we have hosts. By default a host that a service belongs to is</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>capable to modify userCertificate attribute of the service already, so I</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>would expect it to be able to issue certificates with subject principal</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>corresponding to the service.</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>If CAACL would follow the same logic by allowing hosts that manage</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>services to issue certificates with subject principals corresponding to</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>these services, that should be enough because, after all, these host</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>objects already have write permissions and can upload whatever</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>certificates they like to the service objects.</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>--</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>/ Alexander Bokovoy</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Personally, I was very surprised when I discovered that, even though a host</span><br></blockquote><blockquote type="cite"><span>principal may manage a service principal, it is currently unable to request</span><br></blockquote><blockquote type="cite"><span>a certificate for that service principal if the service principal doesn't</span><br></blockquote><blockquote type="cite"><span>have specific access to the certificate profile, even though the host</span><br></blockquote><blockquote type="cite"><span>principal may have access to the same certificate profile. In my mind the CA</span><br></blockquote><blockquote type="cite"><span>ACL should be evaluated against the identity of the requestor, not the</span><br></blockquote><blockquote type="cite"><span>issuee. As long as the requestor is allowed to request on behalf of the</span><br></blockquote><blockquote type="cite"><span>issuee (achieved via the managedby attribute), then it should work. Now, if</span><br></blockquote><blockquote type="cite"><span>I used the credentials of the service principal directly (say, with a</span><br></blockquote><blockquote type="cite"><span>service keytab) to make the request (supposing the service principal wasn't</span><br></blockquote><blockquote type="cite"><span>listed in the CA ACL), then denying the request would be the expected</span><br></blockquote><blockquote type="cite"><span>behaviour (imo of course).</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Okay, so even though Alexander's suggestion might be more intuitive,</span><br></blockquote><blockquote type="cite"><span>implementing service groups might be more feasible from a technical</span><br></blockquote><blockquote type="cite"><span>standpoint, and I'm fairly sure this use case would also be solved by</span><br></blockquote><blockquote type="cite"><span>implementing service groups. But, it would be painful without automember</span><br></blockquote><blockquote type="cite"><span>regexp rules, so please don't forget this :D</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Cheers!</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><span>The CA ACLs solve a different part of the authorisation puzzle for</span><br><span>certificates: what profiles (or, in the future, (sub-)CAs) may be</span><br><span>used to issue certs to a given subject is a different question from</span><br><span>which entities can request certificates on behalf of the subject.</span><br><span>Profiles which are allowed for a host principal (representing</span><br><span>physical or virtual machines) are not necessarily the same profiles</span><br><span>that should be used for service principals.  This is why CA ACLs</span><br><span>must be executed against the issuee principal.</span><br><span></span><br><span>It is best to implement service groups then support them in CA ACLs.</span><br><span></span><br><span>Final note: directory ACIs allow hosts to request certificates for</span><br><span>services they manage.  The overall authorisation for cert issuance</span><br><span>depends on *both* the directory ACIs and CA ACLs.</span><br><span></span><br><span>Cheers,</span><br><span>Fraser</span><br><span></span><br><blockquote type="cite"><span>On 2016-03-22 20:50, Fraser Tweedale wrote:</span><br></blockquote><blockquote type="cite"><blockquote type="cite"><span>On Tue, Mar 22, 2016 at 09:59:58AM +0100, Martin Kosek wrote:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>On 03/22/2016 05:55 AM, Fraser Tweedale wrote:</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>On Fri, Mar 18, 2016 at 08:12:44PM +1100, earsdown wrote:</span><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>...</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>To my fellow FreeIPA developers: are service groups a sensible RFE?</span><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Is there a reason why they have not been implemented?</span><br></blockquote></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>It *is* sensible RFE and it was actually already filed!</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span><a href="https://fedorahosted.org/freeipa/ticket/5277">https://fedorahosted.org/freeipa/ticket/5277</a></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Please feel free to add yourself to CC to receive updates or even help</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>us with</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>implementation.</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Thanks,</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span>Martin</span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Good to know... I've added myself to Cc and also filed an RFE for</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>enhancing CA ACLs with service groups once #5277 is implemented:</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span><a href="https://fedorahosted.org/freeipa/ticket/5753">https://fedorahosted.org/freeipa/ticket/5753</a></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span></span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Cheers,</span><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span>Fraser</span><br></blockquote></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>-- </span><br></blockquote><blockquote type="cite"><span>Manage your subscription for the Freeipa-users mailing list:</span><br></blockquote><blockquote type="cite"><span><a href="https://www.redhat.com/mailman/listinfo/freeipa-users">https://www.redhat.com/mailman/listinfo/freeipa-users</a></span><br></blockquote><blockquote type="cite"><span>Go to <a href="http://freeipa.org">http://freeipa.org</a> for more info on the project</span><br></blockquote></div></blockquote></body></html>