How Autoenrollment Works
Updated: January 01, 2003
This section discusses how autoenrollment works,
including autoenrollment and Winlogon, an analysis
of the components of the autoenrollment process, and
working with certification authority interfaces.
Key Points
Autoenrollment works best in a Windows Server 2003
Enterprise environment where the Windows XP client
is integrated with Active Directory.
Only
domain-joined machines can use certificate
autoenrollment. Although the autoenrollment process
does not explicitly look for domain-joined machines,
the Winlogon process will not activate userinit.exe
unless the machine/user is part of a domain.
Autoenrollment Timing
The autoenrollment process is normally triggered by
the Winlogon process, and is designed to be
activated and managed by a domain-based Group
Policy. Both machine-based and user-based Group
Policy can activate autoenrollment for machines and
users. By default, the Group Policy is applied at
reboot for machines, or at logon for users, and is
refreshed every eight hours. The refresh interval
can be configured using Group Policy. Autoenrollment
is also triggered by an internal timer that
activates every eight hours after the last time
autoenrollment was activated.
For additional
information, see Updating Group Policy.
The Autoenrollment Process
The autoenrollment feature handles all aspects of
certificate enrollment, renewal, and certificate
housekeepingexcept in the case where user
interaction is explicitly defined on a certificate
template in Active Directory. When the
autoenrollment process is triggered by Winlogon or a
Group Policy refresh interval, the operating system
queries Active Directory to download the appropriate
certificate stores into the local store on the
client machine; for example, root CA certificates,
cross-certificates, and the NTAuth container. The
autoenrollment process also downloads certificate
templates from the forest and caches the list in the
registry at the same time. The last step performed
by autoenrollment is user-object cleanup (userCertificate
attribute) in Active Directory. Revoked, expired,
and superseded certificates are removed from the
user object automatically; however, expired
certificates are not removed unless a new valid
certificate is issued at the same time. Certificates
in the local user profile or on the user object in
Active Directory are only managed if the certificate
corresponds to a certificate template in Active
Directory. Foreign certificates and certificates
that do not contain the template extension are not
managed. This is a transparent activity that is
processed asynchronously.
Requirements List
The autoenrollment process will then process the
list of templates and create a requirements list for
any templates that have an autoenroll access control
entry (ACE) set on the template for the current
machine or user. The machine and/or user must also
have the Read ACE set on the template or the
template will not be enumerated. The users or
machines MY (personal) store will also be processed
at this time to look for revoked certificates,
certificates without private keys, time invalid
certificates and so on, and add these certificates
to the requirements list. For more information about
certificate stores, refer to the Microsoft Platform
SDK:
http://msdn.microsoft.com/library/en-us/security/security/managing_certificates_with_certificate_stores.asp
It is very possible that a user may have a
certificate in the MY store but not have permissions
set on a template access control list (ACL) in
Active Directory. These will be processed and added
to the list, but enrollment will most likely fail
due to the fact that the template permissions do not
allow enrollment/renewal at the updated point in
time.
Items in the requirements list may be removed if
an appropriate valid certificate is found in the MY
store. If a certificate template is marked to check
Active Directory for an existing certificate, Active
Directory will be queried for an existing duplicate
certificate on the userCertificate attribute of the
user object and the requirement will be removed from
the list, if successful.
Autoenrollment also manages the CryptoAPI REQUEST
store for the user. This process enumerates each
pending request in the store and then installs the
pending certificate, if possible, from the issuing
CA. If a certificate is to be archived or deleted,
based on the certificate template rule, it will be
processed as follows:
| |
If a request already
exists in the REQUEST store, this
certificate will be removed from the
summarized requirements list. |
| |
If a request has been
pending for more than 60 days, the request
will be deleted and the requirements list
will remain as-is. |
Autoenrollment can be used to retrieve pending
requests only for certificates with template
information, for example, an initial request
involving a certificate template. The autoenroll ACL
on the certificate template is not necessary for the
autoenrollment process to retrieve a pending
certificate request. If the user enrolls via a Web
page and the certificate request is pending,
autoenrollment will retrieve the pending request for
the user.
Template supersede rules will be evaluated and
appropriate additions and deletions will be
processed for the requirements list. For example, if
the template says "X supersedes Y ", it means that
if you have been told to enroll for X and Y, you
really only need X. If you only have Y, you still
must get X. This is the last step in rule
processing. After it is done, the requirements list
is complete.
For each template that does not require user
interaction, the autoenrollment process will create
the requests in the background and submit them to a
CA. Once this is done, the requirements list is
updated.
Autoenrollment always performs a revocation check
of the entire certificate chain starting with the
issuing certification authority to ensure that the
CA offering enrollment services is not revoked
before performing enrollment. If the CA is revoked,
autoenrollment will not send requests to that
certification authority. However, autoenrollment
will ignore revocation errors if a CDP (CRL
Distribution Point) extension does not exist in the
CA certificate or if the revocation status is
offline.
If a certificate is issued from the CA, it is
installed in the users or machines MY store. If the
certificate is pended [specified by the CA Manager
approval check box in the Certificate Template
Microsoft Management Console (MMC) snap-in], the
request information is saved in the REQUEST store.
Balloon User Interface
For each request that requires user interaction as
per the certificate template, the balloon user
interface (UI) is invoked.
| |
Approximately 60
seconds after logon, the balloon UI is
displayed. If no user interaction is
explicitly defined on the certificate
template, no UI will be displayed to the
user. This delay is incorporated to allow
for speedy application and shell response
times during the logon and booting of the
client machine. |
| |
If the 60-second delay
is not desired, the following registry key
may be added on a per-user basis. |
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Cryptography\AutoEnrollment\AEExpress
Using this key in a normal production environment
is not recommended. If it is used, it must be
created on a per-user basis.
| |
The balloon UI waits
for the user to see the balloon and is
activated by a mouse click. Note that after
approximately 15 seconds, the balloon pop-up
window is replaced in the notification area
by a certificate icon that may be activated
by a mouse click. |
| |
If no activation occurs
within seven hours, the taskbar icon will
disappear and the silent thread will
re-activate at the next logon, machine
reboot, or Group Policy refresh interval,
whichever is first. |
| |
Once the user activates
the UI, the REQUEST store is checked first
for pending requests. |
Issuing the Template
Once a certificate template with the proper ACE has
been enumerated, the autoenrollment process will
search for a Microsoft Enterprise Certification
Authority in Active Directory that can issue the
template. If more than one Enterprise CA is found,
the client will try each CA in the list in random
order (for load balancing) until a CA responds and
is able to issue a certificate.
The client
contacts a CA through a Distributed Component Object
Model (DCOM) interface and supplies a security
context through DCOM to provide an authenticated
request. The default policy module of the Microsoft
Enterprise CA enforces certificate profiles and
enrollment security as defined by the templates.
If the certification authority is set to pend the
request for an administrator or certificate manager
to examine and approve, autoenrollment will
periodically query the CA during every Group Policy
refresh interval for approved requests.
Autoenrollment will also re-enroll templates when
Reenroll all certificate holders has been set in
Group Policy. For more information, see Certificate
Renewal.
Certification Authority Interfaces
The following methods are used by the autoenrollment
process for contacting and enrolling against a
Microsoft Enterprise CA.
| |
GetCAProperty |
| |
Submit |
| |
GetLastStatus |
| |
GetRequestId |
| |
GetFullResponseProperty |
| |
GetCertificate |
| |
Release |
| |
RetrievePending |
These methods can be found in the Platform SDK at
http://msdn.microsoft.com/library/default.asp
Configuring the Certificate Templates
This section covers how to configure certificate
templates and provides a step-by-step example of how
to create a new template for the autoenrollment of a
smart card. Certificate template permissions are
also explained.
Key Point
A version 2 certificate template must first be
created in Active Directory to enable
autoenrollment.
Default Settings
The following are default settings.
| |
Only root domain
administrators or explicitly delegated users
in Active Directory may configure templates
in a domain that has been upgraded from
Windows 2000 Server. |
| |
Both domain
administrators from the root domain and
enterprise administrators for fresh
installations of Windows Server 2003 domains
may configure templates. |
| |
Certificate template
ACLs are viewed in the Certificate Templates
MMC snap-in. |
| |
Certificate templates
can be cloned or edited using the
Certificate Templates MMC snap-in. |
Creating a New Template for the Autoenrollment of a
Smart Card
To create a new template for autoenrollment of a
smart card
|
1. |
Log on as a domain administrator. |
|
2. |
Click the Start button, and then
click Run. |
|
3. |
In the Run dialog box, in the
Open box, type mmc.exe, and then
click OK. |
|
4. |
On the File menu, click
Add/Remove Snap-in. |
|
5. |
In the Add/Remove Snap-in dialog
box, click Add. |
|
6. |
In the Add Standalone Snap-in
dialog box, click Certificate Templates,
and then click Add.
|
|
7. |
Click Close. |
|
8. |
Click OK.
|
|
9. |
In the console tree, click
Certificate Templates. |
|
10. |
In the details pane, right-click the
Smartcard User template, and then click
Duplicate Template |