Este conteúdo não está disponível no idioma selecionado.
5.8. Enrolling a Certificate on a Cisco Router
Simple Certificate Enrollment Protocol (SCEP), designed by Cisco, is a way for a router to communicate a certificate issuing authority, such as a CA, to enroll certificates for the router.
Normally, a router installer enters the CA's URL and a challenge password (also called a one-time PIN) into the router and issues a command to initiate the enrollment. The router then communicates with the CA over SCEP to generate, request, and retrieve the certificate. The router can also check the status of a pending request using SCEP.
5.8.1. Enabling SCEP Enrollments Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
For security reasons, SCEP enrollments are disabled by default in the CA. To allow routers to be enrolled, SCEP enrollments must be manually enabled for the CA.
- Stop the CA server, so that you can edit the configuration files.
systemctl stop pki-tomcatd@instance_name.service
systemctl stop pki-tomcatd@instance_name.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open the CA's
CS.cfg
file.vim /var/lib/pki/instance_name/ca/conf/CS.cfg
vim /var/lib/pki/instance_name/ca/conf/CS.cfg/var/lib/pki/instance_name/ca/conf/CS.cfg/var/lib/pki/instance_name/ca/conf/CS.cfg
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the
ca.scep.enable
to true. If the parameter is not present, then add a line with the parameter.ca.scep.enable=true
ca.scep.enable=true
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the CA server.
systemctl start pki-tomcatd@instance_name.service
systemctl start pki-tomcatd@instance_name.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.8.2. Configuring Security Settings for SCEP Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Several different parameters allow administrators to set specific security requirements for SCEP connections, such as not using the same certificate for enrollment authentication and regular certificate enrollments, or setting allowed encryption algorithms to prevent downgrading the connection strength. These parameters are listed in Table 5.2, “Configuration Parameters for SCEP Security”.
Parameter | Description |
---|---|
ca.scep.encryptionAlgorithm | Sets the default or preferred encryption algorithm. |
ca.scep.allowedEncryptionAlgorithms | Sets a comma-separated list of allowed encryption algorithms. |
ca.scep.hashAlgorithm | Sets the default or preferred hash algorithm. |
ca.scep.allowedHashAlgorithms | Sets a comma-separated list of allowed hash algorithms. |
ca.scep.nickname | Gives the nickname of the certificate to use for SCEP communication. The default is to use the CA's key pair and certificate unless this parameter is set. |
ca.scep.nonceSizeLimit | Sets the maximum nonce size, in bytes, allowed for SCEP requests. The default is 16 bytes. |
To set security settings for connections for SCEP enrollments:
- Stop the CA server, so that you can edit the configuration files.
systemctl stop pki-tomcatd@instance_name.service
systemctl stop pki-tomcatd@instance_name.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Open the CA's
CS.cfg
file.vim /var/lib/pki/instance_name/ca/conf/CS.cfg
vim /var/lib/pki/instance_name/ca/conf/CS.cfg/var/lib/pki/instance_name/ca/conf/CS.cfg/var/lib/pki/instance_name/ca/conf/CS.cfg
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set the desired security parameters, as listed in Table 5.2, “Configuration Parameters for SCEP Security”. If the parameter is not already present, then add it to the
CS.cfg
file.Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the CA server.
systemctl start pki-tomcatd@instance_name.service
systemctl start pki-tomcatd@instance_name.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.8.3. Configuring a Router for SCEP Enrollment Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Note
Not all versions of router IOS have the relevant crypto features. Make sure that the firmware image has the Certification Authority Interoperability feature. Certificate System SCEP support was tested on a Cisco 2611 router running IOS C2600 Software (C2600-JK9S-M), version 12.2(40), RELEASE SOFTWARE (fc1).
Before enrolling SCEP certificates on the router, make sure that the router is appropriately configured:
- The router must be configured with an IP address, DNS server, and routing information.
- The router's date/time must be correct.
- The router's hostname and dnsname must be configured.
See the router documentation for instructions on configuring the router hardware.
5.8.4. Generating the SCEP Certificate for a Router Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following procedure details how to generate the SCEP certificate for a router.
- Pick a random PIN.
- Add the PIN and the router's ID to the
flatfile.txt
file so that the router can authenticate directly against the CA. For example:vim /var/lib/pki/instance_name/ca/conf/flatfile.txt UID:172.16.24.238 PWD:Uojs93wkfd0IS
vim /var/lib/pki/instance_name/ca/conf/flatfile.txt UID:172.16.24.238 PWD:Uojs93wkfd0IS
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Be sure to insert an empty line after thePWD
line.The router's IP address can be an IPv4 address or an IPv6 address.Using flat file authentication is described in Section 9.2.4, “Configuring Flat File Authentication”. - Log into the router's console. For this example, the router's name is
scep
:scep>
scep>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable privileged commands.
scep> enable
scep> enable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enter configuration mode.
scep# conf t
scep# conf t
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Import the CA certificate for every CA in the certificate chain, starting with the root. For example, the following command sequence imports two CA certificates in the chain into the router:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set up a CA identity, and enter the URL to access the SCEP enrollment profile. For example, for the CA:
scep(config)# crypto ca identity CA scep(ca-identity)# enrollment url http://server.example.com:8080/ca/cgi-bin scep(ca-identity)# crl optional
scep(config)# crypto ca identity CA scep(ca-identity)# enrollment url http://server.example.com:8080/ca/cgi-bin scep(ca-identity)# crl optional
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Get the CA's certificate.
scep(config)# crypto ca authenticate CA Certificate has the following attributes: Fingerprint: 145E3825 31998BA7 F001EA9A B4001F57 % Do you accept this certificate? [yes/no]: yes
scep(config)# crypto ca authenticate CA Certificate has the following attributes: Fingerprint: 145E3825 31998BA7 F001EA9A B4001F57 % Do you accept this certificate? [yes/no]: yes
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Generate RSA key pair.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Lastly, generate the certificate on the router.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Close configuration mode.
scep(config)# exit
scep(config)# exit
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To make sure that the router was properly enrolled, list all of the certificates stored on the router.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.8.5. Working with Subordinate CAs Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Before a router can authenticate to a CA, every CA certificate in the CA's certificate chain must be imported into the router, starting with the root. For example, the following command sequence imports two CA certificates in the chain into the router:
If the CA certificates do not have the CRL distribution point extension set, turn off the CRL requirement by setting it to
optional
:
scep(ca-root)# crl optional
scep(ca-root)# crl optional
After that, set up the CA identity as described in Section 5.8.4, “Generating the SCEP Certificate for a Router”.
5.8.6. Re-enrolling a Router Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Before a router can be re-enrolled with new certificates, the existing configuration has to be removed.
- Remove (zeroize) the existing keys.
scep(config)# crypto key zeroize rsa % Keys to be removed are named scep.server.example.com. Do you really want to remove these keys? [yes/no]: yes
scep(config)# crypto key zeroize rsa % Keys to be removed are named scep.server.example.com. Do you really want to remove these keys? [yes/no]: yes
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove the CA identity.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
5.8.7. Enabling Debugging Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The router provides additional debugging during SCEP operations by enabling the debug statements.
5.8.8. Issuing ECC Certificates with SCEP Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
By default, an ECC CA does not support SCEP out of box. However, it is possible to work around it by using a designated RSA certificate to handle each of the following two areas:
- encryption/decryption cert - designate an RSA cert having encryption/decryption capability; (scepRSAcert in the following example)
- signature cert - get an RSA cert to use on the client side for signing purpose instead of self-signed; (signingCert cert in the following example)
For example, with scepRSAcert cert being the encrypt/decrypt cert, and signingCert being the signing cert:
sscep enroll -c ca.crt -e scepRSAcert.crt -k local.key -r local.csr -K sign.key -O sign.crt -E 3des -S sha256 -l cert.crt -u 'http://example.example.com:8080/ca/cgi-bin/pkiclient.exe'
sscep enroll -c ca.crt -e scepRSAcert.crt -k local.key -r local.csr -K sign.key -O sign.crt -E 3des -S sha256 -l cert.crt -u 'http://example.example.com:8080/ca/cgi-bin/pkiclient.exe'