Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-6178

Elytron - inconsistency between DMR and XSD representation of regex-name-validating-rewriter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Optional Optional
    • 7.1.0.DR7
    • 7.1.0.DR5
    • Security
    • None

      There is an inconsistency between DMR and XSD representation of regex-name-validating-rewriter.
      According to XSD[1] is match attribute optional. On the other hand DMR[2] says that match attribute is mandatory ("nillable" => false).
      Match attribute is currently required if user adds a new regex-name-validating-rewriter. Is it an intentional behaviour or should match be optional (=according to XSD definition)?

      [1] https://github.com/wildfly-security/elytron-subsystem/blob/master/src/main/resources/schema/wildfly-elytron_1_0.xsd#L1321

      [2] /subsystem=elytron:read-resource-description(recursive=true)

      "regex-name-validating-rewriter" => {
                      "description" => "A regular expression based Name Rewriter which uses the regular expression to validate the name.",
                      "model-description" => {"*" => {
                          "description" => "A regular expression based Name Rewriter which uses the regular expression to validate the name.",
                          "capabilities" => [{
                              "name" => "org.wildfly.security.name-rewriter",
                              "dynamic" => true
                          }],
                          "attributes" => {
                              "match" => {
                                  "type" => BOOLEAN,
                                  "description" => "Should names that match the pattern be rejected or names that don't",
                                  "expressions-allowed" => true,
                                  "nillable" => false,
                                  "default" => true,
                                  "access-type" => "read-write",
                                  "storage" => "configuration",
                                  "restart-required" => "resource-services"
                              },
                              "pattern" => {
                                  "type" => STRING,
                                  "description" => "The regular expression to use to locate the portion of the name to be replaced.",
                                  "expressions-allowed" => true,
                                  "nillable" => false,
                                  "min-length" => 1L,
                                  "max-length" => 2147483647L,
                                  "access-type" => "read-write",
                                  "storage" => "configuration",
                                  "restart-required" => "resource-services"
                              }
                          },
                          "operations" => undefined,
                          "notifications" => undefined,
                          "children" => {}
                      }}
                  }
      

              jkalina@redhat.com Jan Kalina (Inactive)
              jtymel Jan Tymel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: