Skip to content

ValueGenerators

Jim Potter edited this page Dec 1, 2022 · 2 revisions

Attribute Value Generators

There are several different recipes for generating target values, best explained by demonstration. For each entity, the attribute value generator will be evaluated, any deviations from the expected value in the target will generate changes (to be applied at the end of the processing)

Parameters common to all attribute value generators:

  • attribute - the name of the target attribute (required)
  • updateAction - whether to OVERWRITE, APPEND, REMOVE or CLEAR (?) the value. Only applicable to multi value attributes (default: OVERWRITE)
  • conditions - the conditions under which this generator will be evaluated - CREATE, UPDATE and/or REMOVE (default: CREATE and UPDATE)
  • caseSensitive (default false) - whether the target value will be case sensitive

LiteralAttribute

Sets attribute values to specific values:

   - !LiteralAttribute
      attribute: objectClass
      values: 
      - user
      - top
      - person
      - organizationalPerson

Parameters:

  • values: a list of Strings to set the values to

CopyAttribute

Copy a value from the source attribute unmodified

Example:

   - !CopyAttribute
      attribute: sn
      source: surname

Parameters:

  • source - where to get the value from in the source entity

RandomAttribute

Generate something random

Example:

   - !RandomAttribute
      attribute: userPassword
      conditions:
      - CREATE
      length: 12
      characters:
      - abcde
      - ABCDE
      - 12345

Parameters:

  • length: low long a string is required (required)
  • characters: sets of characters to use

RegexAttribute

Use Regex to process values from the source:

Exmaple:

   - !RegexAttribute
      attribute: sAMAccountName
      sources: 
      - employeeID
      - firstname
      - surname
      pattern: s/(\w+):(\w)\w*:(\w).+/$1$2$3/
  • so Fred Bloogs, employeeID = 1234 this would give 1234FBloogs

Parameters:

  • sources: list of attributes from source entity to concatenate
  • delimter: (default ':') - the string used to separate each value in the source concatenation
  • pattern: a regex substitution pattern
Clone this wiki locally