Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-17539

Move rbac testing from XSLT to cli script

XMLWordPrintable

    • Medium
    • ---
    • ---

      Currently RBAC configuration is done through XSLT transformation. We should use a cli script for this. Since AS 7 we don't recommend that users manipulate XML for recurring server configuration tasks, so we shouldn't do it ourselves. The use of XSLT also makes maintenance more difficult by introducing a distinct configuration technique that maintainers need to understand.

      The testsuite/integration/rbac/pom.xml uses the org.codehaus.mojo:xml-maven-plugin to perform xml transformation on the standalone*.xml files in the WildFly installation that will be tested (which other plugins will place in that module's target/wildfly directory). Instead we should have a wildfly-maven-plugin execution of its 'execute-commands' goal that will execute one or more CLI scripts. The scripts would execute the CLI embed-server command, followed by operations to modify the configuration, followed by the stop-embedded-server command. (There are numerous similar uses of execute-commands in the WildFly testsuite that can server as illustrations.)

      The scripts would execute against the standalone-full.xml configuration. The 'access-integration-default-full.surefire' surefire execution's setting of jboss.server.config.file.name would be change from 'properties-role-mapping-standalone-full.xml' (a file that is created by the xml transform) to 'standalone-full.xml' (the standard file the CLI will update.)

      A prerequisite for working on this is familiarity with configuring WildFly via its CLI. Basic familiarity with XSLT and how to configure maven plugins is also needed.

      Work on this requires willingness to learn how RBAC is configured via the CLI (as documented in https://docs.wildfly.org/32/Admin_Guide.html#RBAC) and how those settings relate to what ends up in standalone.xml. This will allow the author to understand what the XSLT is doing and identify the appropriate CLI commands to include in the script.

            Unassigned Unassigned
            ehugonne1@redhat.com Emmanuel Hugonnet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: