Problem description

There is a need for generating accounts in large quantities, particularly for the purposes of using together with Calling Card module. The current generation process is not flexible enough to provide useful functionality.

Requirements for the proposed solution

  1. It should be possible to generate any reasonable number of accounts from the single "master" profile entry.
  2. Contents of the fields to be generated should be easily configurable for at least 2 main categories: secure pseudo-random sequence of digits, secure pseudo-random alphanumeric password.
  3. It should be possible to specify that two or more fields to be populated with the same auto-generated value.

Proposed Solution

The following extensions are proposed to be made to the current generation facility:

  1. Optional numeric modifier is allowed after the `G' command in the Action field specifying number of records to be generated.
  2. For the fields to contain auto-generated values the following format is allowed:
    • ${N:xxx}, sequence of random digits. xxx here should be in the format [range1][range2]...[rangeN], where rangeX is either list of allowed digits for this position (i.e. [0,4,9]) or range of such digits (i.e. [0-6]). For example: [2,3,4][0-8][0-9][0-9] will generate numbers in the ranges 2000-2899, 3000-3899 and 4000-4899. The algorithm should deal with random digits generation one-by one (i.e. generate first digit, second, etc and then check if such record already exist, but should contain some kind of simple protection from exhausting search space and infinite loop, for example the database option specifying how many attempt to generate number before displaying the error code.
    • ${C:xxx}, reference to another column. xxx here should be number of another column (starting with 1) to copy the value from. For example, if username column is the first one and voip login is the third, placing {N:xxx} directive into the username column and {C:1} into the voip login will result in the same auto-generated value to be placed into both columns.
    • ${P:xxx}, alphanumeric password. xxx here should be the required length of the generated password phrase.

Example of the specification:

Id Account Name Web Password VoIP Login VoIP Password IVR Pin Balance Lifetime Action
${N:[1-9][0-9][0-9]} ${P:8} ${C:2} ${P:16} ${N:[0-9][0-9]} 10.0 30 G100

This specification will generate 100 accounts with Account Name in the range 100-999 and PIN code in the range 00-99, generate Web Password to be a random alphanumeric string with lengh of 8 symbols, generate VoIP Login to be the same as Account Name, generate VoIP password to be a random alphanumeric string with lengh of 16 symbols and set Balance and Lifetime to be 10.0 and 30 respectively.