Wolf,<br><br>module-options do not support expressions yet, there is an issue open to add support for it: <a 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 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=&quot;urn:jboss:domain:security:1.2&quot;&gt;<br>
                  &lt;security-domains&gt;<br>
                       ....<br>
                       &lt;security-domain name=&quot;lbank&quot;
      cache-type=&quot;default&quot;&gt;<br>
                          &lt;authentication&gt;<br>
                              &lt;login-module code=&quot;UsersRoles&quot;
      flag=&quot;required&quot;&gt;<br>
                                  &lt;module-option
      name=&quot;usersProperties&quot;
      value=&quot;${jboss.server.config.dir}/lbank-users.properties&quot;/&gt;<br>
                                  &lt;module-option
      name=&quot;rolesProperties&quot;
      value=&quot;${jboss.server.config.dir}/lbank-roles.properties&quot;/&gt;<br>
                                  &lt;module-option
      name=&quot;password-stacking&quot; value=&quot;useFirstPass&quot;/&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>
                &quot;outcome&quot; =&gt; &quot;success&quot;,<br>
                &quot;result&quot; =&gt; {<br>
                    &quot;acl&quot; =&gt; undefined,<br>
                    &quot;audit&quot; =&gt; undefined,<br>
                    &quot;authorization&quot; =&gt; undefined,<br>
                    &quot;cache-type&quot; =&gt; &quot;default&quot;,<br>
                    &quot;identity-trust&quot; =&gt; undefined,<br>
                    &quot;jsse&quot; =&gt; undefined,<br>
                    &quot;mapping&quot; =&gt; undefined,<br>
                    &quot;authentication&quot; =&gt; {&quot;classic&quot; =&gt;
            {&quot;login-modules&quot; =&gt; [{<br>
                        &quot;code&quot; =&gt; &quot;UsersRoles&quot;,<br>
                        &quot;flag&quot; =&gt; &quot;required&quot;,<br>
                        &quot;module-options&quot; =&gt; [<br>
                            (&quot;usersProperties&quot; =&gt; expression
            &quot;${jboss.server.config.dir}/lbank-users.properties&quot;),<br>
                            (&quot;rolesProperties&quot; =&gt; expression
            &quot;${jboss.server.config.dir}/lbank-roles.properties&quot;),<br>
                            (&quot;password-stacking&quot; =&gt; &quot;useFirstPass&quot;)<br>
                        ]<br>
                    }]}}<br>
                }<br>
            }<br>
            [standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:read-attribute(name=login-modules)<br>
            {<br>
                &quot;outcome&quot; =&gt; &quot;success&quot;,<br>
                &quot;result&quot; =&gt; [{<br>
                    &quot;code&quot; =&gt; &quot;UsersRoles&quot;,<br>
                    &quot;flag&quot; =&gt; &quot;required&quot;,<br>
                    &quot;module-options&quot; =&gt; [<br>
                        (&quot;usersProperties&quot; =&gt; expression
            &quot;${jboss.server.config.dir}/lbank-users.properties&quot;),<br>
                        (&quot;rolesProperties&quot; =&gt; expression
            &quot;${jboss.server.config.dir}/lbank-roles.properties&quot;),<br>
                        (&quot;password-stacking&quot; =&gt; &quot;useFirstPass&quot;)<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 &quot;classic&quot; 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>
            &quot;outcome&quot; =&gt; &quot;failed&quot;,<br>
            &quot;failure-description&quot; =&gt; &quot;JBAS014688: Wrong type for
        value. Expected [LIST] but was STRING&quot;,<br>
            &quot;rolled-back&quot; =&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>
            &quot;outcome&quot; =&gt; &quot;failed&quot;,<br>
            &quot;failure-description&quot; =&gt; &quot;JBAS014807: Management resource
        &#39;[<br>
            (\&quot;subsystem\&quot; =&gt; \&quot;security\&quot;),<br>
            (\&quot;security-domain\&quot; =&gt; \&quot;lbank2\&quot;),<br>
            (\&quot;authentication\&quot; =&gt; \&quot;classic\&quot;)<br>
        ]&#39; not found&quot;,<br>
            &quot;rolled-back&quot; =&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: &#39;null&#39;<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 href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
<a 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>