Allow SAN extension for cert-request self-service

Users cannot self-issue a certificate with a subjectAltName
extension (e.g. with rfc822Name altNames).  Suppress the
cert-request "request certificate with subjectaltname" permission
check when the bind principal is the target principal (i.e.
cert-request self-service).

Fixes: https://fedorahosted.org/freeipa/ticket/5190
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
Fraser Tweedale authored and Jan Cholasta committed 2015-08-11 12:25:51 +02:00
1 parent 6f8b0ed4fa
commit aafc0e980b
1 file changed
+1 -1
+1 -1
View File
@@ -369,7 +369,7 @@ class cert_request(VirtualCommand):
error=_("Failure decoding Certificate Signing Request: %s") % e)
# host principals may bypass allowed ext check
if bind_principal_type != HOST:
if bind_principal != principal and bind_principal_type != HOST:
for ext in extensions:
operation = self._allowed_extensions.get(ext)
if operation: