Honestly, I've only ever worked with CA's in a flat domain, although I did set up a lab child domain with its own 2-tier CA a year or so ago.
Intermediate CA's are generally found in 3 or more tiers. They
aren't the root and don't issue certs to end points. Often they
may be policy CA's or just used to manage a large tree of CA's.
That's my understanding of the terms, though.
I don't think it matters "where" you install the Issuing CA, so long as all accounts that will enroll certificates can be authenticated by the CA. Remember, you can have multiple CA's. Nothing says you can't have one in each domain, so long as they are trusted by all relevant end points.
For your CRL, even the root CA needs to republish it. In the Windows CA world, you would have defined an "lifespan" for the CRL. Normally, I would define a 1-year lifespan and power on my root CA every 6 months to republish. In an ideal world, you will never revoke a cert from your root. It should only ever issue CA certs for the sub-CA's and those never go away, get corrupt, get hacked, etc, right?
Your root ca should also have defined the location of its CRL.
You did use just "http" right? When you publish the root CRL,
you'll need to copy it over to the web server (or other CRL
distribution point). I generally create a
"http://pki.public.domain/CRL" website and put all of my CRL's
there.
Just use an account with Domain Admin & Enterprise Admin permissions to install the Issuing CA.
Word of advice. Test, test, test! Test your root CA and
validate the certs it issues are exactly the way you want them
BEFORE you install your sub-CAs. Make sure the CRL and AIA point
to the correct addresses. Make sure all devices that will trust
your certs can accept your Root CA cert. (I've had issues in the
past with some devices, specifically Cisco, not able to accept any
certs over 2048 bits). If anything fails, tear it down and try
again. Test publishing and replication of your CRL. You can
publish as often as you wish, so don't worry about it, but you
_must_ republish before it expires.
When you are satisfied with your Root CA, install your sub-CA,
but DON'T allow anyone to enroll certs. Ideally, don't add any
templates yet. Create a test template that only you can manually
enroll against. Issue a cert and validate that it is EXACTLY the
way you want. If it doesn't look right, tear it down and
reinstall just that CA. Just be sure to clean up any certs/CA
records that may get published to AD.
CA's aren't really that hard, but there is a learning curve, so take the time and get it right. Once they are in operation, many of the important settings CANNOT be changed.
Unfortunately, you've made a decision to not use Windows as your root CA. Nothing wrong with that, I've thought about doing it myself, but as this is the NTsysadmin list, you're going to find more Windows advice than Linux, I'd bet. But let's see what we can do.
You should be able to take your Root CA's public key, copy it to
your Windows workstation and double click on it. If it's in the
correct format, it will open the standard certificate dialog. It
will show the info you need to verify: key length, algorithm, etc.
It's been a while since I set up a root CA, so my memory was
foggy. Since it's a root, you trust that explicitly. As it is
self-signed, there is not CRL. Also, since it is a root
certificate, there the Authority Information Access (AIA) is not
embedded as that tells endpoints where to get the parent certs.
It's confusing, I know. With a Windows CA, you can open the MMC
and view all of the configuration easily.
I would expect that you would still define the CDP and AIA when installing the root CA. That information will be embedded in any certificates (other than the root cert) that are issued by the CA.
Out of curiosity, what distribution and certificate server are you using?
I generally try to map out a website to hold my CA related information. It will always use 'http' only. I normally do not have it running on my CA, but it can. It always uses a host header that is different than the host's name. Often I will have it in my DMZ so certificate information can be accessed internally or externally. With the host header, you can have a farm of web servers as large as you need, just be sure they are all up to date with cert chains and crl's.
A quick search for openssl.cnf yielded https://pki-tutorial.readthedocs.io/en/latest/expert/component-ca.conf.html It looks like they do it in a round-about way, but yes, I believe your [crl_info] will define "URI.0" as your CDP web address.
Everything you are learning and implementing applies if you do a single-tier or a multi-tier PKI. A multi-tier adds a little bit of complexity, but can make things much easier and more efficient in the long run. For example: create an offline root ca with an issuing CA in your production domain that issues just computer certs and a CA for issuing user certs. Now create an issuing CA in your domain that issues smartcard (PIV) certs. Create a 4rd CA to issue manual certs for network gear/IoT/etc. Each of these can be managed by a separate department. All of these CA's and their certs would be trusted because of the one root cert. Granted this is not a real-world example and I would add policy servers into that mix.
Root CA's are the easiest until you import its cert into AD. Even then it's not difficult to get rid of.
I really want to stress to not tie your CDP/AIA to an actual hostname.
In DNS create an A record and point it to your IIS server IP address. I prefer the A record over CNAME, but you could use that as well. Call it "pki.ad.domainname" with your values for "ad.domainname"
In your IIS, create a new website pointing to an empty folder. On that website, click "Edit Bindings". Create a new binding for "http" and the DNS name you just created, "pki.ad.domainname". Remove any other bindings that may be on THAT website.
Create a "hello world" web page on that site.
Once DNS replicates, open a web browser to "http://pki.ad.domainname/helloworld.htm" and you should get the web page.
You've just set up a web page with a host header. That website will only respond on that hostname, not the actual hostname of the machine. This will allow one machine to host many webpages.
To load balance/HA, create a 2nd A record, "pki.ad.domainname",
pointing to a 2nd IIS host IP address. Replicate the steps
above. Now DNS will round robin the hosts: host A, then host B,
then host a again, etc.
Quick search:
https://knowledge.digicert.com/solution/SO20113.html
(Just ignore the parts about SSL, they are not needed for your PKI
website)
Root CA's are the easiest until you import its cert into AD. Even then it's not difficult to get rid of.
I really want to stress to not tie your CDP/AIA to an actual hostname.
Name your CDP/AIA something like pki.<domain>. If you name it pki.<host>.<domain> then you have to retain that host “forever”. (Yes, there are ways around this, but why complicate life?)
Thanks.
Regards,
Michael B.
From: ntsys...@googlegroups.com [mailto:ntsys...@googlegroups.com]
On Behalf Of Michael Leone
Sent: Thursday, June 20, 2019 3:18 PM
To: NTSysAdmin
Subject: Re: [ntsysadmin] Re: More certificate confusion - issuing CA server config
On Tue, Jun 18, 2019 at 4:03 PM Dennis Pinckard <ntsys...@doomsdaypig.com> wrote:
--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntsysadmin+...@googlegroups.com.
To post to this group, send email to
ntsys...@googlegroups.com.
Visit this group at https://groups.google.com/group/ntsysadmin.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/CAHBr%2B%2BiNH7%3DjbFzU7EVnbyOMVWjjb5R%2BtbWNLTcrKvrKbzY2GA%40mail.gmail.com.
Name your CDP/AIA something like pki.<domain>. If you name it pki.<host>.<domain> then you have to retain that host “forever”. (Yes, there are ways around this, but why complicate life?)
Am I Don in this scenario? :)
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/070edd7243ed497d9ffa7f57c169d34f%40smithcons.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/fc79832d-241d-e5db-c835-4ae4d62fc1c0%40doomsdaypig.com.
One of the main reasons is you don't want your certificates to leak information about your internal structure. "Ooh. His CA hostname must be 'cert002.domain', I'll attack that first!"
Don't tie the web site url to any specific machine. Otherwise,
that machine has to live for the lifespan of your certs. (Sure
you can rebuild with the same name, but why limit yourself at the
beginnning). Use a host header and it can be moved to any web
server. It can be scaled out to a farm of two or more webservers
for HA. (Take one down for maintenance and not impact users)
I like to keep my CDP/AIA named "pki.publicdomain.com". I don't HAVE to publish it to the internet, but with a split-dns I have that option. Say I want to implement Work Folders in windows and have it be available to my users. Only domain users would ever need or be allowed to access them and I need a trusted certificate on my web application proxy in the DMZ. Rather than spending money on a public cert, since all of my domain workstations already trust the internal PKI, I would publish my CDP/AIA to the Internet. Then when workstations are off the network, they can still validate my internally issued certificates.
One of the main reasons is you don't want your certificates to leak information about your internal structure. "Ooh. His CA hostname must be 'cert002.domain', I'll attack that first!"
Don't tie the web site url to any specific machine. Otherwise, that machine has to live for the lifespan of your certs. (Sure you can rebuild with the same name, but why limit yourself at the beginnning). Use a host header and it can be moved to any web server. It can be scaled out to a farm of two or more webservers for HA. (Take one down for maintenance and not impact users)
I like to keep my CDP/AIA named "pki.publicdomain.com". I don't HAVE to publish it to the internet, but with a split-dns I have that option. Say I want to implement Work Folders in windows and have it be available to my users.
Only domain users would ever need or be allowed to access them and I need a trusted certificate on my web application proxy in the DMZ. Rather than spending money on a public cert, since all of my domain workstations already trust the internal PKI, I would publish my CDP/AIA to the Internet. Then when workstations are off the network, they can still validate my internally issued certificates.
Sorry if this message gets duplicated. I sent it this morning, but it still hasn't appeared in my inbox.
Fortunately, in Windows, updating the CDP locations is easy to do, but only takes effect on certificates issued after that change. Since the CDP is embedded in the issued certificates, there's no way to update it within them after issuing other than re-issuing. I'm sure it would work the same on Linux.
I will again advise only including http CDP's in your issued certificates. In my Windows CA properties, on the "Extensions" tab, I will generally only have (NOTE: Windows will substitute the correct values for the <> variable placeholders. Don't fill them in yourself):
"C:\Windows\System32\CertSrv\CertEnroll\<CaName><CRLNameSuffix><DeltaCRLAllowed>.crl"
"file://c:\InetPub\PKIRoot\CDP\<CaName><CRLNameSuffix><DeltaCRLAllowed>.crl"
These entries will have "Publish CRLs to this location" and "Publish Delta CRLs to this location" checked. I will have a scheduled task to keep any other web servers in sync, if needed.
Additionally I will include:
"http://pki.domain.name/CDP/<CaName><CRLNameSuffix><DeltaCRLAllowed>.crl"
This entry will have only "Include in the CDP extension of issued certificates" checked.
Why do I only use HTTP? So non-domain and non-windows devices can access the CDP. So domain computers that are not on the network can access the CDP. Clients will start with the 1st CDP location and try to access it, if it times out, it will go to the next in the list. I prefer to just use http and ensure it is accessible internally and externally (when required). All clients should understand how to use http.
Notice above that the <CAName> is embedded in the filename of the CRL? This is a BIG reason to not use your hostname as the CA Name. Don't leak your internal names and make it easy for the bad actors.
Also, this means that one website can host all of your CDP's, AIA's, CPS's, etc. You CAN create a separate website for root and issuing, but that's just extra work, IMHO. You define the settings for each CA individually, but nothing says you can't set all of the published CDP's to the same web site. You will need to set up some method of getting the Root CA's CRL over to the PKI website every time your publish it. (Automation is your friend here!)
When you revoke a certificate, you are flagging that certificate in the database on the CA that issued it. Then that CA needs to republish the CRL to include that certificate. So you can ONLY revoke a certificate on the CA that issued it. A Root CA should only ever issue certificates for Issuing CA's and those are the only ones it knows about and the only ones it can revoke. Just remember if you revoke the cert for an issuing CA, then all of the certificates issued by that issuing CA just got invalidated. You broke the chain of trust.
Here's some of my CA links for additional reading in the spare time of a Network Admin:
https://social.technet.microsoft.com/wiki/contents/articles/10942.ad-cs-security-guidance.aspx
https://www.derekseaman.com/tag/certificate-authority
https://timothygruber.com/tag/pki/
https://blogs.technet.microsoft.com/xdot509/tag/operating-a-pki/
The PSParentPath (in this case) tells you it is a machine certificate, located in the Personal (‘My’) store.

Thanks.
Regards,
Michael B.
-----Original Message-----
From: ntsys...@googlegroups.com [mailto:ntsys...@googlegroups.com] On Behalf Of Michael Leone
Sent: Monday, June 24, 2019 10:27 AM
To: NTSysAdmin
Subject: Re: [ntsysadmin] Re: More certificate confusion - issuing CA server config
On Fri, Jun 21, 2019 at 4:56 PM Dennis Pinckard
--
Michael J. Leone, <mailto:tur...@mike-leone.com>
PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>
Just backpacking through the Uncanny Valley ....
--
You received this message because you are subscribed to the Google Groups "ntsysadmin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntsysadmin+...@googlegroups.com.
To post to this group, send email to ntsys...@googlegroups.com.
Visit this group at https://groups.google.com/group/ntsysadmin.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/CAHBr%2B%2BjjzFuVpdo1uv4OA49WQymdVNc%3D4CrVXk9ZU5z%2BPG7V%2BA%40mail.gmail.com.