[jboss-as7-dev] Use of CLI to add security-domain
Alexey Loubyansky
alexey.loubyansky at redhat.com
Fri Aug 3 11:53:58 EDT 2012
On 07/27/2012 08:02 PM, Wolf-Dieter Fink wrote:
> #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
This is for the security team to answer.
> I suppose that this should be correct, but it shows an error:
> EAP6
> /[standalone at 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
> }
> /
Looks like this version doesn't support simplified syntax for parameter
values, so try using complete DMR format, i.e. [{"code"=>"UsersRoles", ...
> AS7.2 (upstream)
> /[standalone at 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
> }/
The classic doesn't exist. It has to be added first, i.e.
[standalone at localhost:9999 /]
/subsystem=security/security-domain=lbank/authentication=classic:add( ...
where you initialize the login-modules.
> Next difficulty is to add the module-options with expressions.
>
> Any guiding or help?
>
> Wolf
>
>
>
> BTW the CLI tab completition crash:
> //subsystem=security/security-domain=lbankx/authentication=(
> java.lang.IllegalArgumentException: The argument value is not specified
> for name: 'null'
> at
> org.jboss.as.cli.operation.impl.DefaultOperationRequestBuilder.addProperty(DefaultOperationRequestBuilder.java:113)
> at
> org.jboss.as.cli.operation.impl.DefaultOperationCandidatesProvider.getProperties(DefaultOperationCandidatesProvider.java:208)
> at
> org.jboss.as.cli.operation.impl.DefaultOperationCandidatesProvider.getProperties(DefaultOperationCandidatesProvider.java:51)
> at
> org.jboss.as.cli.operation.OperationRequestCompleter.complete(OperationRequestCompleter.java:142)
> at org.jboss.as.cli.CommandCompleter.complete(CommandCompleter.java:93)
> at org.jboss.as.cli.impl.Console$Factory$1$1.complete(Console.java:96)
> at org.jboss.jreadline.console.Console.complete(Console.java:809)
> at org.jboss.jreadline.console.Console.read(Console.java:383)
> at org.jboss.jreadline.console.Console.read(Console.java:221)
> at org.jboss.as.cli.impl.Console$Factory$1.readLine(Console.java:166)
> at
> org.jboss.as.cli.impl.CommandContextImpl.interact(CommandContextImpl.java:1129)
> at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:243)
> at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.jboss.modules.Module.run(Module.java:270)
> at org.jboss.modules.Main.main(Main.java:294)
> /
I don't see this in upstream. Do you? I'll check 7.1...
Thanks,
Alexey
More information about the jboss-as7-dev
mailing list