This document details some limitations in the current CA ACL and certificate request features and proposes (at a very high-level) a way forward for FreeIPA to support more use cases and give administrators more fine-grained control of certificate issuance authorisation. Feedback and additional use cases are sought.
The current controls governing certificate issuance authorisation are limited, falling short for a number of important use cases:
- Currently a single permission,
request certificate, controls whether an operator can issue a certificate, along with the ability to write the subject entity'suserCertificateattribute. This check is waived for "self-service" requests and for host principal operators. (The request is still subject to CA ACLs, unless the operator has therequest certificate ignoring caaclpermission, anduserCertificateattribute write access checks). - A use case where current implementation falls short: only
vpnadminsuser group should be able to issue certs for hosts invpnservershostgroup (using VPN profile and CA), and onlywebadminsuser group should be able to issue certs for hosts inwebservershostgroup (using HTTPS profile and CA). Currently,request certificatepermission is required to request the cert, but having that permission means that the operator could request VPN or HTTPS certs regardless of group membership.
- For self-service requests (operator is subject), the
request certificatepermission is not checked. If a CA ACL allows a particular CA+profile to issue a cert to the subject, then self-service is unconditionally allowed. This is not good enough, e.g. if some kind of certificate, though appropriate for the subject, should only be issued by an admin. - Proper operator authorisation (use case (1)) should encompass this, i.e. self-service is allowed when operator scope is a superset of subject scope.
- "External" means an subject that is not an IPA user, host or service. It could be some other object in the IPA directory (e.g. KDC krbtgt principal) or an object that exists outside IPA directory, e.g. a trusted realm principal, ACME client, etc.
- Each kind of internal and external subject will have a particular way to validate the
CSR and authorise the request. An example ACL requirement for smart cards might be,
"users in group
scadminscan issue certs from CAscwith profilescto trusted realm principals whose principal name matches regex "...". The CSR validator for this use case would have to ensure that the subject exists and that Subject DN and alternative names match the subject. - We may also want to allow external principals as operator, e.g. allow a group of users from trusted AD realm to issue certs to themselves or certain IPA users/hosts/services or external subjects.
- Additional concrete external subject use cases are sought, so that we can get this right!
- This needs to be solved in a generic way that would work accross the framework, so that it can be reused for other parts of IPA where external users are relevant. Now that we allow AD users to log into IPA, there may be many cases.
- Service groups
- Main ticket: https://fedorahosted.org/freeipa/ticket/5277
- caacl ticket: https://fedorahosted.org/freeipa/ticket/5753
- Only check if operator has write access to subject's
userCertificateattribute if subject has such an attribute, and active profile is configured to store issued certificates.
Simo and Fraser discussed the following:
- Moving validation (and possibly authorisation) logic to separate processes.
- Benefits:
- Programs can be written in whatever language makes sense
- Programs can be more easily tested, independently of IPA framework
- Where it makes sense programs can be delivered as separate packages or products, or customers can implement their own.
- Configuration can be passed in environment and/or program args.
- Moving validation and authorisation logic to Dogtag. Context:
- Move more certificate handling logic to Dogtag plugins. (Specifically: plugins that invoke external processes, per previous point.)
- This pattern has precedent in
KeyRetrieverinterface andExternalProcessKeyRetrieverimplementation, which are part of Dogtag and invoke theipa-pki-retrieve-keyprogram, which is part of FreeIPA.
- Dogtag now (v4.4) has Kerberos principal which it can use to connect to IPA directory and read data for validating CSR, and read ACLs.
- GSS-API support ( https://fedorahosted.org/freeipa/ticket/5011 ) would allow Dogtag to query LDAP with operator credentials, but using Dogtag principal may be saner from a debugging/support POV because LDAP permissions may vary among operators, leading to different/unpredictable results.
- It's a step toward (Fraser's) long-term vision of Dogtag reading certificate data directly from LDAP (or external sources) according to profile, rather than requiring operator to construct and pass CSR with the "correct" data which must then be validated. See https://blog-ftweedal.rhcloud.com/2015/11/freeipa-pki-current-plans-and-a-future-vision/.