Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New legacy id generator #4875

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

New legacy id generator #4875

wants to merge 15 commits into from

Commits on Oct 17, 2024

  1. Add option for decimal range numbers

    With legacy serial ID, request and replica ranges are expressed in decimal while serial in hex.
    However, there is a problem in the hex management which create gaps in
    the sequences every time a new range is allocated.
    
    Since gaps could create problems to third party software it has been
    introduced a new parameter in CS.cfg to set the same format for all ranges:
    
    dbs.numberRangeRadix
    
    If this is not present or negative then the current default is adopted
    and nothing change.
    
    If this is set to 10 all the values are handled as decimal and the
    ranges work properly. If set to different values than 10 (e.g. 16 for
    hex) the gap problem is still present.
    
    This new parameter is not update during the update to avoid creating
    problem to running instances which do not have problem with range gaps.
    
    In case to move the value to 10 and solve the gaps problem then the
    CS.cfg serial range has to be fixed considering the current value as
    hex. Also the nextRange in the following DS node has to fixed
    accordingly:
    
    ou=certificateRepository,ou=ca,<prefix>
    fmarco76 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    55ab888 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    80a5732 View commit details
    Browse the repository at this point in the history
  3. Make serial range operation in DS not radix dependent

    Range information in DS will be stored in decimal format so all the
    related operation do not need radix to be read.
    fmarco76 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    c1f27e3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0c15cba View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b4c6c3f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    234a3f5 View commit details
    Browse the repository at this point in the history
  7. Add test for newLegacy id generator

    The test convert from legacy generator to newLegacy and verify that not
    gaps are present when new ranges are created
    fmarco76 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    ba07e30 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7bca87d View commit details
    Browse the repository at this point in the history
  9. Add new pki-server ca-range-generator-* commands

    This include 2 command:
    - "show" to get the id generator configured
    - "update" to change the generator. It is possible to move from legacy
      to legacy2 and from legacy or legacy2 to random
    fmarco76 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    02bb72a View commit details
    Browse the repository at this point in the history
  10. Update sequential test to use command for generator update

    The generator are updated with the new command:
    
    pki-server ca-range-generator-update --type <generator_type>
    <generator_namne>
    fmarco76 committed Oct 17, 2024
    Configuration menu
    Copy the full SHA
    79e07e7 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. Split the redix options beteween request and cert

    The just introduced option `dbs.numberRangeRadix` has been splitted in:
    - `dbs.cert.id.radix`
    - `dbs.request.id.radix`
    
    If they are not present the default value of 16 for cert and 10 for
    request will be used.
    fmarco76 committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    125b477 View commit details
    Browse the repository at this point in the history
  2. Update all ranges when move from legacy to legacy2

    In legacy serial number ranges are stored as hex for cert and decimal
    for request. The legacy2 is using decimal for all the values stored in
    DS. The update command is converting stored ranges to decimal to match
    with the new format and avoid problems.
    fmarco76 committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    e83c163 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4fb546b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    26e8c1b View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. Configuration menu
    Copy the full SHA
    da9f148 View commit details
    Browse the repository at this point in the history