When an RA is first created, certain default users and groups with default roles are created automatically. An initial user,
admin, is created with both agent and administrator roles, and two groups are created to identify agent and administrator users. Additional users and additional groups can be added to manage the RA subsystem and PKI operations.
The RA subsystem does not use a Java console as the other subsystems do, so users and groups are created and managed through the administrator's web services page for the RA.
By default, the RA has administrator and agent groups. Other groups can be configured, depending on the local demands of the PKI and network, and then the new group can be assigned to function as an administrative or agent group.
A user can perform tasks based on what groups he is a member of. An RA agent, for example, must belong to a configured RA agent group to perform agent tasks.
- Open the RA services page.
http
s://server.example.com:12889/services - Click the Administrator Services link.
- Click the List Groups link.
- There are two default groups, for agents and for administrators. To view the details about any group, click the GID of the group.

- Open the RA services page.
http
s://server.example.com:12889/services - Click the Administrator Services link.
- Click the New Group link.
- Fill in the group ID and the name of the group; the name can be longer than the GID, more like a description, to help differentiate the group.

- Click the Add New Group link at the top of the form.
- After the group is created, add it to the RA configuration so that the group has agent or administrative functions.
- Stop the RA instance.
service pki-ra stop
Always stop a subsystem before editing the subsystem configuration files. - Open the
CS.cfgfile.vim /var/lib/pki-ra/conf/CS.conf
- Add the new group's GID to the administrator or agent group list.
admin.authorized_groups=administrators,
exampleagent.authorized_groups=administrators,agents,example - Start the RA instance.
service pki-ra start
When a group is created, it does not have any members. Likewise, as new users are added, they have to be added to a group for them to be granted any privileges to the RA.
- Open the RA services page.
http
s://server.example.com:12889/services - Click the Administrator Services link.
- Click the List Groups link.
- Click the name of the group for which to change the group membership.

- In the group page, each current member of the group is listed, with a [Delete] link next to the name.Existing members who are not members of the group are listed in a drop-down menu. To add a member, select them from the name from the menu, and click Add.

RAs have two distinct types of users: agents and administrators.
There is a division between agent tasks and administrative tasks, even though both sets of functions are accessed through web services pages. RA agent tasks manage operations related to issuing certificates, like approving requests. RA administrator tasks relate to managing the server instance, mainly managing users and groups.
For an RA user to be able to perform their tasks, the user entry must be created and then added to the appropriate group.
A default user is created when the RA is first configured, and this admin user belongs to both the agent and administrator groups.
- Open the RA services page.
http
s://server.example.com:12889/services - Click the Administrator Services link.
- Click the List Users link.
- All of the configured users for the RA are shown. To view a user, click the UID for that user.

- The user details page shows the person's UID, full name, email address, and user SSL certificate.

- Generate a new certificate for the user. All access to the RA web services pages is done through certificate-based authentication, so all RA agents and administrators must have a certificate. This is covered in Section 13.5.2.3, “Generating Agent Certificates for RA Agents”.
- Open the RA services page.
http
s://server.example.com:12889/services - Click the Administrator Services link.
- Click the New User link.
- Fill in the user ID, full name, and email address of the user, and paste in the base 64-encoded certificate requested in the first step (including the
----BEGIN CERTIFICATE-----and----END CERTIFICATE-----lines).
- Click the Add New User link at the bottom of the form.
- Once the user is created, add him as a member to the appropriate group so that the user can perform any RA agent or administrator functions. Adding members to groups is covered in Section 13.5.1.3, “Adding and Removing Users in an RA Group”.
RA agents must have a client certificate that allows them to authenticate to the RA subsystem (meaning accessing the RA agent and administrator services pages). Any SSL client certificate can be used, as long as it is added to the RA's LDAP database, but it is easier to use the default enrollment process in the RA services page.
- Request a one-time PIN to use as a certificate request.
- Click SSL End Users Services to open the request submission page.
- Click Agent Enrollment.

- Click PIN Creation Request.

- Enter an appropriate UID and email address.

- An existing agent must approve the PIN request.
- Open the agent services page.
- Click List Requests. The PIN request is listed in a table with a status of OPEN.
- Click the Request ID to display the details of the request.

- Click Approve to approve the request. This generates the PIN the user will use to retrieve the certificate.

- The last step is for the user to use the generated PIN to retrieve his certificate.
- Open the SSL End Users Services page.
- Click Request Status Check.
- In the Request ID field, enter the ID of the PIN request.
- Click the value in the Import Certificate field to display the one-time PIN.
- Click Agent Enrollment again, and then click the Certificate Enrollment link.
- Enter the user ID and the PIN.

- When the certificate is successfully generated, base-64 encoded blob is displayed.

Regenerating the certificate takes its original key and its original profile and request, and recreates an identical key with a new validity period and expiration date.
The RA has a default administrative user that was created at the time the subsystem was created. A new certificate can be requested for this user when their original one expires, using one of the default renewal profiles.
Certificates for administrative users can be renewed directly in the end user enrollment forms, using the serial number of the original certificate.
- Renew the admin user certificates through the CA's end users forms, as described in Section 4.8.2, “Certificate-Based Renewal”. This must be the same CA as first issued the certificate (or a clone of it).Agent certificates can be renewed by using the certificate-based renewal form in the end entities page, Self-renew user SSL client certificate. This form recognizes and updates the certificate stored in the browser's certificate store directly.
TIP
It is also possible to renew the certificate usingcertutil, as described in Section 15.3.3, “Renewing Certificates Using certutil”. Rather than using the certificate stored in a browser to initiate renewal,certutiluses an input file with the original key. - Export the renewed certificate from the browser.
- Copy the certificate to the RA server.
- The certificate can only be imported into the SQLite database used by the RA if it is formatted on a single line, so the certificate has to be edited in two ways:
- Remove the
-----BEGIN CERTIFICATE-----and-----END CERTIFICATE-----lines. - Remove all of the carriage returns and spaces so that all of the text is on one line.
- Back up the current certificate database. For example:
cp -p /var/lib/pki-ra/conf/dbfile /var/lib/pki-ra/conf/dbfile-20090318
- Update the RA administrator's entry in the SQLite database. Make sure that the complete certificate is pasted in, all on a single line.
sqlite3 /var/lib/pki-ra/conf/dbfile "UPDATE users SET certificate='MIIDkBFCAmYusjMpBA==' WHERE uid='admin';"
- Restart the RA.
service pki-ra restart
- Restart the browser, and attempt to log in using the new certificate. When the browser prompts to select the certificate to use to authenticate, the new certificate should be available.
- Open the RA services page.
http
s://server.example.com:12889/services - Click the Administrator Services link.
- Click the List Users link.
- All of the configured users for the RA are shown. To view a user, click the UID for that user.

- At the bottom of the page, click the [Delete] link.
