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"><<a href="mailto:wfink@redhat.com" target="_blank">wfink@redhat.com</a>></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> <subsystem
xmlns="urn:jboss:domain:security:1.2"><br>
<security-domains><br>
....<br>
<security-domain name="lbank"
cache-type="default"><br>
<authentication><br>
<login-module code="UsersRoles"
flag="required"><br>
<module-option
name="usersProperties"
value="${jboss.server.config.dir}/lbank-users.properties"/><br>
<module-option
name="rolesProperties"
value="${jboss.server.config.dir}/lbank-roles.properties"/><br>
<module-option
name="password-stacking" value="useFirstPass"/><br>
</login-module><br>
</authentication><br>
</security-domain></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" => "success",<br>
"result" => {<br>
"acl" => undefined,<br>
"audit" => undefined,<br>
"authorization" => undefined,<br>
"cache-type" => "default",<br>
"identity-trust" => undefined,<br>
"jsse" => undefined,<br>
"mapping" => undefined,<br>
"authentication" => {"classic" =>
{"login-modules" => [{<br>
"code" => "UsersRoles",<br>
"flag" => "required",<br>
"module-options" => [<br>
("usersProperties" => expression
"${jboss.server.config.dir}/lbank-users.properties"),<br>
("rolesProperties" => expression
"${jboss.server.config.dir}/lbank-roles.properties"),<br>
("password-stacking" => "useFirstPass")<br>
]<br>
}]}}<br>
}<br>
}<br>
[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:read-attribute(name=login-modules)<br>
{<br>
"outcome" => "success",<br>
"result" => [{<br>
"code" => "UsersRoles",<br>
"flag" => "required",<br>
"module-options" => [<br>
("usersProperties" => expression
"${jboss.server.config.dir}/lbank-users.properties"),<br>
("rolesProperties" => expression
"${jboss.server.config.dir}/lbank-roles.properties"),<br>
("password-stacking" => "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" => "failed",<br>
"failure-description" => "JBAS014688: Wrong type for
value. Expected [LIST] but was STRING",<br>
"rolled-back" => 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" => "failed",<br>
"failure-description" => "JBAS014807: Management resource
'[<br>
(\"subsystem\" => \"security\"),<br>
(\"security-domain\" => \"lbank2\"),<br>
(\"authentication\" => \"classic\")<br>
]' not found",<br>
"rolled-back" => 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 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>