<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 08/03/2012 05:53 PM, Alexey
Loubyansky wrote:<br>
</div>
<blockquote cite="mid:501BF416.8000709@redhat.com" type="cite">
<pre wrap="">On 07/27/2012 08:02 PM, Wolf-Dieter Fink wrote:
</pre>
<blockquote type="cite">
<pre wrap="">#simple is
//subsystem=security/security-domain=lbank:add(cache-type=default)/
but how to know that "classic" must used?
//subsystem=security/security-domain=lbank/authentication=/
tab completition will not help, only if I type =classic: the tab
completition will show commands otherwise not
</pre>
</blockquote>
<pre wrap="">
This is for the security team to answer.
</pre>
<blockquote type="cite">
<pre wrap="">I suppose that this should be correct, but it shows an error:
EAP6
/[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:write-attribute(name=login-modules,value=[{code=UsersRoles,flag=required}])
{
"outcome" => "failed",
"failure-description" => "JBAS014688: Wrong type for value.
Expected [LIST] but was STRING",
"rolled-back" => true
}
/
</pre>
</blockquote>
<pre wrap="">
Looks like this version doesn't support simplified syntax for parameter
values, so try using complete DMR format, i.e. [{"code"=>"UsersRoles", ...
</pre>
<blockquote type="cite">
<pre wrap="">AS7.2 (upstream)
/[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:write-attribute(name=login-modules,value=[{code=UsersRoles,flag=required}])
{
"outcome" => "failed",
"failure-description" => "JBAS014807: Management resource '[
(\"subsystem\" => \"security\"),
(\"security-domain\" => \"lbank2\"),
(\"authentication\" => \"classic\")
]' not found",
"rolled-back" => true
}/
</pre>
</blockquote>
<pre wrap="">
The classic doesn't exist. It has to be added first, i.e.
[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:add( ...
where you initialize the login-modules.
</pre>
</blockquote>
Looks like that AS7.2 include a fix and the different messages are
confusing me.<br>
The trick is:<br>
<br>
/subsystem=security/security-domain=lbank2/authentication=classic:add(login-modules=[{code=UsersRoles,flag=required}])<br>
<br>
But if I add the module options:<br>
<small>[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank2/authentication=classic:add(login-modules=[{code=UsersRoles,flag=required,module-options=[{name=userProperties,value="ABC"}]}])<br>
{<br>
"failure-description" => [<br>
"JBAS014798: Validation failed for login-modules",<br>
"JBAS014688: Wrong type for module-options. Expected
[OBJECT] but was LIST"<br>
],<br>
"rolled-back" => true<br>
}<br>
<br>
<big>How do I add th module-options as OBJECT?<br>
<br>
<br>
The result should look like:<br>
<i><small>[standalone@localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:read-resource<br>
{<br>
"outcome" => "success",<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>
]<br>
}]}<br>
}<br>
<br>
XML:<br>
</small></i></big></small><small>
<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>
<small><big><br>
</big></small><br>
</body>
</html>