-
1. Re: "JBAS014771: Services with missing/unavailable dependencies"
andey May 15, 2017 8:12 AM (in response to osklizg)There are many ways to authorize users with application using security-domain[1]
I will show you 2 ways:
Common setting for application : web.xml
~~~
<web-app>
..
<security-constraint>
<web-resource-collection>
<web-resource-name>HtmlAdaptor</web-resource-name>
<description>An example security config that only allows users with the
role JBossAdmin to access the HTML JMX console web application
</description>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>JBoss JMX Console</realm-name>
</login-config>
<security-role>
<role-name>JBossAdmin</role-name>
</security-role>
</web-app>
~~~
==================================================================================================
Way 1 - Using applicationRealm and role
1.1. add user(application user) & Role
EAP_HOME/bin/add-user.sh
~~~
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): b
Enter the details of the new user to add.
Using realm 'ApplicationRealm' as discovered from the existing property files.
Username : admin
The username 'admin' is easy to guess
Are you sure you want to add user 'admin' yes/no? yes
Password :
Re-enter Password :
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: JBossAdmin
About to add user 'admin' for r ealm 'ApplicationRealm'
Is this correct yes/no? yes
~~~
1.2.Edit jboss-web.xml
~~~
<jboss-web>
<security-domain>java:/jaas/other</security-domain>
</jboss-web>
~~~
Way 2 - Custom Security Domain & specific property files.
2.1. Edit standalone.xml
~~~
<security-domains>
....
<security-domain name="jmx-console" cache-type="default">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
<module-option name="usersProperties" value="${jboss.server.config.dir}/jmx-console- users.properties"/>
<module-option name="rolesProperties" value="${jboss.server.config.dir}/jmx-console- roles.properties"/>
</login-module>
</authentication>
</security-domain>
</security-domains>
~~~
2.2. Edit jboss-web.xml
~~~
<jboss-web>
<security-domain>java:/jaas/jmx-console</security-domain>
</jboss-web>
~~~
2.3. Edit property files
EAP_HOME/standalone/configuration/jmx-console-users.properties
~~
admin=admin
~~
EAP_HOME/standalone/configuration/jmx-console-roles.properties
~~
admin=JBossAdmin
~~
-
2. Re: "JBAS014771: Services with missing/unavailable dependencies"
osklizg May 16, 2017 12:45 AM (in response to andey)You are right, thanks!