#9661 Change the default CA serial number algorithm to random serial numbers
Closed: fixed by frenaud. Opened by rcritten.

Request for enhancement

Sequential serial numbers issued by the CA rely on a 389-ds feature named Virtual List View ( VLV).
With the switch in 389-ds to the LMDB backend the performance of VLV has decreased significantly. The PKI team recommends only using random serial numbers with LMDB.
This will also achieve a goal of non-conflicting serial numbers of a series of installation attempts. It is often an issue with browsers when a new IPA server is stood up multiple times during initial deployment where the subject/serial numbers conflict because sequential serial numbers always begin at 1.
Currently to enable random serial numbers in an installation one needs to provide the --random-serial-numbers options to ipa-server-install and/or ipa-ca-install. The value of the serial number protocol is stored in cn=ipa,cn=cas,cn=ca,$SUFFIX in the attribute. ipacarandomserialnumberversion. 0 for sequential and 3 for random.

Several things need to happen.
1. Make the --random-serial-number option redundant and set this value always to True
2. Update the value of ipacarandomserialnumberversion. in LDAP on upgrade to enable RSNv3 for all new replicas. This will not affect existing CA servers though We do not recommend mixing indefinitely.

An upgrade plugin is probably the best place to apply #2 so additional logic can take place. We may pin this to a specific version of PKI, or 389-ds or use other external factors to decide when to force enable RSNv3.


Metadata Update from @rcritten:
- Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-57674

On 389-ds 3.5+ there is a function for getting the available DB backend.

from lib389.utils import get_default_db_lib
get_default_db_lib()
'mdb'

PR https://github.com/freeipa/freeipa/pull/7533

master:

  • 3777d2b06299454766ab70ee479a829d5f6b7fc0 Change default to RSN when 389-ds uses the mdb backend
  • ed70380cbb97a355a4d84ca61fd27120cda902b9 ipatests: Test that when lmdb is available, enable RSN
  • 9248e2df86c3a12c277bd783cd8c9ca7e9603286 Add RSN-by-default test to nightly builds
  • 2cd2b8fe43036a97f1051c5aa76fd5ed28e7ed6c Set required version of 389-ds for VLV fix on F40/41
  • 6f304bac61eadbacf4f176421c6927b92b74685e Enable pruning when Random Serial Numbers are enabled
  • 0eafb03110b6ae4c80680e5c451661e1cf41db77 Don't drop certificates in cert-find if the LWCA was removed

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata