<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks Tomaz,<br>
      <br>
      but in my case I strip the command and did not use module-options
      but neither EAP6 nor AS7.2.<br>
      The messages are different, see eMail thread.<br>
      The validation looks correct in case of AS7.2, if I drop i.e.
      'flag' a validation error is shown.<br>
      <br>
      Wolf<br>
      <br>
      On 07/28/2012 10:54 PM, Tomaž Cerar wrote:<br>
    </div>
    <blockquote
cite="mid:CAMquZP4VdqzYO8Qo3YaCpFdZH0c_G5MBM07HCAKkoAN8oUzoRA@mail.gmail.com"
      type="cite">Wolf,<br>
      <br>
      module-options do not support expressions yet, there is an issue
      open to add support for it: <a moz-do-not-send="true"
        href="https://issues.jboss.org/browse/AS7-5177">https://issues.jboss.org/browse/AS7-5177</a><br>
      I have started working on it, but am not done yet..<br>
      <br>
      --<br>
      tomaz<br>
      <br>
      <div class="gmail_quote">On Fri, Jul 27, 2012 at 8:02 PM,
        Wolf-Dieter Fink <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:wfink@redhat.com" target="_blank">wfink@redhat.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div text="#000000" bgcolor="#FFFFFF"> Hi,<br>
            <br>
            I try to add this to the standalone.xml via CLI:<br>
            <br>
                <small>   &lt;subsystem
              xmlns="urn:jboss:domain:security:1.2"&gt;<br>
                          &lt;security-domains&gt;<br>
                               ....<br>
                               &lt;security-domain name="lbank"
              cache-type="default"&gt;<br>
                                  &lt;authentication&gt;<br>
                                      &lt;login-module code="UsersRoles"
              flag="required"&gt;<br>
                                          &lt;module-option
              name="usersProperties"
              value="${jboss.server.config.dir}/lbank-users.properties"/&gt;<br>
                                          &lt;module-option
              name="rolesProperties"
              value="${jboss.server.config.dir}/lbank-roles.properties"/&gt;<br>
                                          &lt;module-option
              name="password-stacking" value="useFirstPass"/&gt;<br>
                                      &lt;/login-module&gt;<br>
                                  &lt;/authentication&gt;<br>
                              &lt;/security-domain&gt;</small><br>
            <br>
            <br>
            If I add it to XML the CLI will show:<br>
            <small><small><i><big>[standalone@localhost:9999 /]
                    /subsystem=security/security-domain=lbank:read-resource(recursive=true)<br>
                    {<br>
                        "outcome" =&gt; "success",<br>
                        "result" =&gt; {<br>
                            "acl" =&gt; undefined,<br>
                            "audit" =&gt; undefined,<br>
                            "authorization" =&gt; undefined,<br>
                            "cache-type" =&gt; "default",<br>
                            "identity-trust" =&gt; undefined,<br>
                            "jsse" =&gt; undefined,<br>
                            "mapping" =&gt; undefined,<br>
                            "authentication" =&gt; {"classic" =&gt;
                    {"login-modules" =&gt; [{<br>
                                "code" =&gt; "UsersRoles",<br>
                                "flag" =&gt; "required",<br>
                                "module-options" =&gt; [<br>
                                    ("usersProperties" =&gt; expression
"${jboss.server.config.dir}/lbank-users.properties"),<br>
                                    ("rolesProperties" =&gt; expression
"${jboss.server.config.dir}/lbank-roles.properties"),<br>
                                    ("password-stacking" =&gt;
                    "useFirstPass")<br>
                                ]<br>
                            }]}}<br>
                        }<br>
                    }<br>
                    [standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:read-attribute(name=login-modules)<br>
                    {<br>
                        "outcome" =&gt; "success",<br>
                        "result" =&gt; [{<br>
                            "code" =&gt; "UsersRoles",<br>
                            "flag" =&gt; "required",<br>
                            "module-options" =&gt; [<br>
                                ("usersProperties" =&gt; expression
                    "${jboss.server.config.dir}/lbank-users.properties"),<br>
                                ("rolesProperties" =&gt; expression
                    "${jboss.server.config.dir}/lbank-roles.properties"),<br>
                                ("password-stacking" =&gt;
                    "useFirstPass")<br>
                            ]<br>
                        }]<br>
                    }<br>
                  </big></i><br>
                <br>
              </small></small>#simple is<br>
            <i><small>/subsystem=security/security-domain=lbank:add(cache-type=default)</small></i><br>
            <br>
            but how to know that "classic" must used?<br>
               <i><small>
                /subsystem=security/security-domain=lbank/authentication=</small></i><br>
            tab completition will not help, only if I type =classic: the
            tab completition will show commands otherwise not<br>
            <br>
            I suppose that this should be correct, but it shows an
            error:<br>
            EAP6<br>
            <i><small>[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:write-attribute(name=login-modules,value=[{code=UsersRoles,flag=required}])<br>
                {<br>
                    "outcome" =&gt; "failed",<br>
                    "failure-description" =&gt; "JBAS014688: Wrong type
                for value. Expected [LIST] but was STRING",<br>
                    "rolled-back" =&gt; true<br>
                }<br>
              </small></i><br>
            AS7.2 (upstream)<br>
            <i><small>[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:write-attribute(name=login-modules,value=[{code=UsersRoles,flag=required}])<br>
                {<br>
                    "outcome" =&gt; "failed",<br>
                    "failure-description" =&gt; "JBAS014807: Management
                resource '[<br>
                    (\"subsystem\" =&gt; \"security\"),<br>
                    (\"security-domain\" =&gt; \"lbank\"),<br>
                    (\"authentication\" =&gt; \"classic\")<br>
                ]' not found",<br>
                    "rolled-back" =&gt; true<br>
                }</small></i><br>
            <br>
            <br>
            Next difficulty is to add the module-options with
            expressions.<br>
            <br>
            Any guiding or help?<br>
            <br>
            Wolf<br>
            <br>
            <br>
            <br>
            BTW the CLI tab completition crash:<br>
            <i><small>/subsystem=security/security-domain=lbankx/authentication=(<br>
                java.lang.IllegalArgumentException: The argument value
                is not specified for name: 'null'<br>
                    at
org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.addProperty(DefaultOperationRequestBuilder.java:113)<br>
                    at
org.jboss.as.cli.operation.impl.DefaultOperationCandidatesProvider.getProperties(DefaultOperationCandidatesProvider.java:208)<br>
                    at
org.jboss.as.cli.operation.impl.DefaultOperationCandidatesProvider.getProperties(DefaultOperationCandidatesProvider.java:51)<br>
                    at
org.jboss.as.cli.operation.OperationRequestCompleter.complete(OperationRequestCompleter.java:142)<br>
                    at
                org.jboss.as.cli.CommandCompleter.complete(CommandCompleter.java:93)<br>
                    at
                org.jboss.as.cli.impl.Console$Factory$1$1.complete(Console.java:96)<br>
                    at
                org.jboss.jreadline.console.Console.complete(Console.java:809)<br>
                    at
                org.jboss.jreadline.console.Console.read(Console.java:383)<br>
                    at
                org.jboss.jreadline.console.Console.read(Console.java:221)<br>
                    at
                org.jboss.as.cli.impl.Console$Factory$1.readLine(Console.java:166)<br>
                    at
org.jboss.as.cli.impl.CommandContextImpl.interact(CommandContextImpl.java:1129)<br>
                    at
                org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:243)<br>
                    at
                org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)<br>
                    at
                sun.reflect.NativeMethodAccessorImpl.invoke0(Native
                Method)<br>
                    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br>
                    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
                    at java.lang.reflect.Method.invoke(Method.java:616)<br>
                    at org.jboss.modules.Module.run(Module.java:270)<br>
                    at org.jboss.modules.Main.main(Main.java:294)<br>
              </small></i><br>
          </div>
          <br>
          _______________________________________________<br>
          jboss-as7-dev mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
          <a moz-do-not-send="true"
            href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev"
            target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
          <br>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>