Jboss Jmx-Console和 Jboss web-console安全设置
1、介绍
如果你暴露你的JBoss服务器通过网络(如通过启动服务器使用选项B 0.0.0.0或者通过改变jboss.bind.address首次出现0.0.0.0在.../jboss/server/default/deploy/web-deployer/server.xml)你自动也暴露了Jboss web控制台(http://localhost:8080/jmx-console)因为管理员工具没有任何用户和密码。
注意:在下面的设置例子中,为默认的jboss服务器配置被使用。
2、jmx-console安全设置
2.1、在../jboss/server/default/deploy/jmx-console.war/WEB-INF/jboss-web.xml 取消如下注释:
- <security-domain>java:/jaas/jmx-console</security-domain>
<security-domain>java:/jaas/jmx-console</security-domain>
2.2、在../jboss/server/default/deploy/jmx-console.war/WEB-INF/web.xml 取消如下注释:
- <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>
- <http-method>GET</http-method>
- <http-method>POST</http-method>
- </web-resource-collection>
- <auth-constraint>
- <role-name>JBossAdmin</role-name>
- </auth-constraint>
- </security-constraint>
<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>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>
2.3、在..../jboss/server/default/conf/props/jmx-console-users.properties 添加或者编辑 admin=a_password_you_like
指定一个不同的用户对jbossadmin组添加“用户名= jbossadmin”到jmx-console-roles.properties.properties文件(同一目录)。
现有的jmx-console-users.properties文件与密码admin管理用户。为了安全,删除用户或更改密码更强的人。
3、web-console安全设置
3.1、在.../jboss/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/jboss-web.xml 取消如下注释:
- <security-domain>java:/jaas/web-console</security-domain>
<security-domain>java:/jaas/web-console</security-domain>
3.2、在../jboss/server/defualt/deploy/management/console-mgr.sar/web-console.war/WEB-INF/web.xml取消如下注释:
- <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>
- <http-method>GET</http-method>
- <http-method>POST</http-method>
- </web-resource-collection>
- <auth-constraint>
- <role-name>JBossAdmin</role-name>
- </auth-constraint>
- </security-constraint>
<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>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>JBossAdmin</role-name>
</auth-constraint>
</security-constraint>
3.3、在.../jboss/server/default/deploy/management/console-mgr.sar/web-console.war/WEB-INF/classes/web-console-users.properties 添加或者编辑行admin=a_password_you_like
指定一个不同的用户对jbossadmin组添加“用户名= jbossadmin”到web-console-roles.properties.properties文件(同一目录)。
现有的web-console-users.properties文件与密码admin管理用户。为了安全,删除用户或更改密码更强的人。
4、实例
4.1、jmx-console安全配置
第一步:打开jboss/server/default/deploy/jmx-console.war/WEB-INF目录下jboss-web.xml文件,添加security-domain,如下图-1所示:
图-1
第二步:同级目录打开web.xml,添加如下代码,如下图-2所示:
图-2
同时查看对应的角色是否存在,如下图-3所示:
图-3
第三步:打开jboss/server/default/conf目录下login-config.xml文件,如下下图-4所示:
图-4
在按照上图中路径找到如下文件,如下图-5所示:
图-5
打开users相关文档,更改admin的密码为etim123$%^,如下图-6所示:
图-6
4.2、web-console的安全设置
第一步:打开如下图所示目录下的jboss-web.xml。
打开jboss-web.xml添加如下内容:
打开同级目录下的web.xml,添加如下内容:
如下图所示路径,修改文件名称为roles.properties和users.properties
打开修改过后的users.properties配置文件,如下图所示:
打开如下路径的login-config.xml,修改为users.properties
更改为如下图所示
保存成功后,启动服务器输入:http://localhost:8080/jmx-console和http://localhost:8080/web-console测试安全机制,是否和自己修改后的账号信息一致。
Jboss Jmx-Console和 Jboss web-console安全设置的更多相关文章
- Apache Kafka监控之Kafka Web Console
Kafka Web Console:是一款开源的系统,源码的地址在https://github.com/claudemamo/kafka-web-console中.Kafka Web Console也 ...
- CDH5X 安装oozie报错To enable Oozie web console install the Ext JS library.
最近在CDH5.X 安装oozie 服务,服务安装完毕,访问oozie server ui,报如下错误: 页面提示: Oozie web console is disabled.To enable O ...
- [Android]通过js方法回调部分native报错 Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
在android4.2以前,注入步骤如下: webview.getSetting().setJavaScriptEnable(true); class JsObject { public String ...
- 【转载】Apache Kafka监控之Kafka Web Console
http://www.iteblog.com/archives/1084 Kafka Web Console是一款开源的系统,源码的地址在https://github.com/claudemamo/k ...
- JBPM WEB CONSOLE安装实录
http://www.blogjava.net/paulwong/archive/2009/03/13/259551.html JBPM WEB CONSOLE是一个B/S端的,能管理JBPM的流程和 ...
- web console实现
一.效果图 二.实现 web console是基于websocket实现的. 以上做的效果嵌入项目中,因为项目本身是angular1的项目,所以console整体封装成一个angualr modul ...
- JBoss环境搭建及部署Web项目
http://blog.csdn.net/pop303/article/details/7210290 赶在年前学习了一下JBOSS,之前觉得JBOSS相关资料会有很多,不过现在发现很少,在亚马逊出也 ...
- 交互式shell脚本web console
官网:http://web-console.org/ 这个脚本可以实现web下交互,也就是有了这玩意后可以不用反弹shell了. <?php // Web Console v0.9.7 (201 ...
- circus && web comsole docker-compose 独立部署web console 的一个bug
如果直接使用以下的docker-compose 文件部署会有通过多播通信获取endpoint 异常的问题(circus 在stats endpoint 获取少了一个c) 这个问题是部分网络情况下会出现 ...
- circus web console 依赖tornado>3.2 无法访问的bug
circus web console 是一个很不错的web 监控circus 工具,但是对于高版本一直存在一个bug 信息如下 Traceback (most recent call last): F ...
随机推荐
- Python远程连接主机之paramiko模块
Python的paramiko模块能够连接远程主机,并在该主机上执行命令,和该主机之间进行文件传输.paramiko支持用明文密码登录远程主机和秘钥登录.使用之前要安装一下这个模块哈,pip inst ...
- Hive use mapreduce引擎 bsonFile splits报错处理
Hive use mapreduce引擎 1. 出现报错.关于bsonFile的.禁止hdfs里面存储的bson文件自动splits. 可以在hive-site.xml文件里面添加如 ...
- rails中常用的插件
config.gem "acts-as-taggable-on", :version => '1.0.19' # tag类 config.gem "papercli ...
- [IMX6]Android6.0移植和分析
0. 知识点 中断(设备树) [IMX6]设备树分析--dts 1. 编译 Android6.0内核移植(1):分析编译日志 Android6.0内核移植(2):kernel编译内核 单独烧录kern ...
- Wordpress性能优化:使用crontab+wp-cli代替wp-cron
wp-cron的问题 Wordpress内置wp-cron的模块,可以用来执行定时任务,比如定时检查更新,定时发布文章等都需要用到,属于必备功能.但是该模块的特点是:它只能在用户发起请求时检查 ...
- [转]C#进阶系列——WebApi 接口参数不再困惑:传参详解
本文转自:http://www.cnblogs.com/landeanfen/p/5337072.html#_label1_2 阅读目录 一.get请求 1.基础类型参数 2.实体作为参数 3.数组作 ...
- unity 中的协程
//The coroutine will continue after all Update functionshave been calledon the next frame. ; //Conti ...
- saas模式
SaaS是Software-as-a-service(软件即服务).SaaS提供商为企业搭建信息化所需要的所有网络基础设施及软件.硬件运作平台,并负责所有前期的实施.后期的维护等一系列服务,企业无需购 ...
- 为Jquery类和Jquery对象扩展方法
转:https://www.cnblogs.com/keyi/p/6089901.html jQuery为开发插件提拱了两个方法,分别是: JavaScript代码 jQuery.fn.extend( ...
- C# 中的委托和事件 --转载
作者:张子阳 转载源: http://www.tracefact.net/CSharp-Programming/Delegates-and-Events-in-CSharp.aspx C# 中的委托 ...