Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-5143

config metadata duplicate regexp causes "Same config key or regex is in multiple files"

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 4.9.3, 5.7.0
    • None
    • API
    • None

    Description

      GrouperDbConfig config = new GrouperDbConfig().configFileName("grouper.properties")
      config.propertyName("LDAPProvisioningHook.exclude.regex.0").value('''.*_excludes$''').store()
      

      Logged to container:

      [main] ERROR ConfigFileMetadata.findConfigItemMetdataFromConfig(499) - [] - Same config key or regex is in multiple files: LDAPProvisioningHook.exclude.regex.1, LDAPProvisioningHook.exclude.regex.0
      [main] ERROR ConfigFileMetadata.findConfigItemMetdataFromConfig(499) - [] - Same config key or regex is in multiple files: LDAPProvisioningHook.exclude.regex.2, LDAPProvisioningHook.exclude.regex.0
      [main] ERROR ConfigFileMetadata.findConfigItemMetdataFromConfig(499) - [] - Same config key or regex is in multiple files: LDAPProvisioningHook.exclude.regex.3, LDAPProvisioningHook.exclude.regex.0
      

      Code is looping through all the property metadata to find which one matches a given value. When there are multiple matches,it reports the error for subsequent matches.

      These are the ones with duplicate metadata, which will cause the errors (which should probably warnings). The count of duplicates is included, and this should correspond with the number of log errors (minus -1):

      • 2: # {valueType: "boolean", required: true, regex: "^security\\.member\\.sort\\.string([0-9]+)\\.wheelOnly$"}
      • 2: # {valueType: "group", regex: "^grouper\\.membership\\.customComposite\\.groupName\\.\\d+$"}
      • 2: # {valueType: "group", required: true, regex: "^security\\.member\\.search\\.string([0-9]+)\\.allowOnlyGroup$"}
      • 2: # {valueType: "group", required: true, regex: "^security\\.member\\.sort\\.string([0-9]+)\\.allowOnlyGroup$"}
      • 2: # {valueType: "group", required: true, regex: "^ws\\.diagnostic\\.checkGroupSize\\.([a-zA-Z0-9._-]+)\\.groupName$"}
      • 2: # {valueType: "integer", required: true, regex: "^ws\\.diagnostic\\.checkGroupSize\\.([a-zA-Z0-9._-]+)\\.minSize$"}
      • 2: # {valueType: "string", regex: "^grouper\\.membership\\.customComposite\\.compositeType\\.\\d+$"}
      • 2: # {valueType: "string", regex: "^grouper\\.membership\\.customComposite\\.uiKey\\.\\d+$"}
      • 2: # {valueType: "string", required: true, regex: "^attributeDef\\.attribute\\.validator\\.attributeName\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^attributeDef\\.attribute\\.validator\\.regex\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^attributeDef\\.attribute\\.validator\\.vetoMessage\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^attributeDefName\\.attribute\\.validator\\.attributeName\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^attributeDefName\\.attribute\\.validator\\.regex\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^attributeDefName\\.attribute\\.validator\\.vetoMessage\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^group\\.attribute\\.validator\\.attributeName\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^group\\.attribute\\.validator\\.regex\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^group\\.attribute\\.validator\\.vetoMessage\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^stem\\.attribute\\.validator\\.attributeName\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^stem\\.attribute\\.validator\\.regex\\.([0-9]+)$"}
      • 2: # {valueType: "string", required: true, regex: "^stem\\.attribute\\.validator\\.vetoMessage\\.([0-9]+)$"}
      • 3: # {valueType: "boolean", required: true, regex: "^security\\.types\\.([^.]+)\\.wheelOnly$"}
      • 3: # {valueType: "string", regex: "^externalSubjects\\.sortAttribute([0-9]+)\\.el$"}
      • 3: # {valueType: "string", required: true, regex: "^db\\.change\\.allow\\.url\\.([0-9]+)$"}
      • 3: # {valueType: "string", required: true, regex: "^db\\.change\\.allow\\.user\\.([0-9]+)$"}
      • 4: # {valueType: "boolean", required: true, regex: "^ws\\.diagnostic\\.ignore\\.([a-zA-Z0-9._-]+)$"}
      • 4: # {valueType: "string", regex: "^LDAPProvisioningHook\\.exclude\\.regex\\.([0-9]+)$"}

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chad.redman.3@at.internet2.edu Chad Redman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: