简体   繁体   English

Glassfish OSGI Web控制台证书

[英]Glassfish OSGI Webconsole Credentials

I have a glassfish 3.1.2.2 installation with OSGI addons installed. 我安装了带有OSGI插件的glassfish 3.1.2.2。 I have also installed the webconsole jars and enabled the console on 我还安装了Webconsole jar并启用了控制台

http://localhost:8080/osgi/system/console

Then as for security, I wanted to change the login username and password, the default one is admin/admin, which is not good for production env. 然后出于安全性考虑,我想更改登录用户名和密码,默认用户名和密码为admin / admin,这对生产环境不利。

I have checked documentation as well as some tutorials online, but seems like they didnt work for Felix Webconsole on Glassfish. 我已经检查了文档以及在线一些教程,但是似乎它们不适用于Glassfish上的Felix Webconsole。

I have tried to modify 我试图修改

gf_home/glassfish/domains/domain1/config/domain.xml

with the parameters Apache Felix Documentation page, and also created a file in 参数Apache Felix文档页面,并在

gf_home/glassfish3/glassfish/modules/autostart/
gf_home/glassfish3/glassfish/osgi/felix/conf

folders, titled org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg in properties file format, but neither of them worked. 以属性文件格式命名为org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg的文件夹,但它们都不起作用。 I am still able to login with admin/admin. 我仍然可以使用admin / admin登录。

Am I missing some point in Webconsole settings? 我是否在Webconsole设置中缺少某些要点? I have checked the code for the org.apache.felix.webconsole.internal.servlet.OsgiManager.java class and the username and password was set there, however, there is an updateConfiguration method to overwrite this values. 我已经检查了org.apache.felix.webconsole.internal.servlet.OsgiManager.java类的代码,并在其中设置了用户名和密码,但是,有一个updateConfiguration方法可以覆盖此值。

What is the proper way to change username and password for the webconsole? 更改网络话务台用户名和密码的正确方法是什么? The only option is to change the default values in the code? 唯一的选择是更改代码中的默认值?

After some trial and error randomly, I found out how to make the config and the webconsole addon work properly.. 经过一番尝试和错误之后,我发现了如何使配置和webconsole插件正常工作。

so I have moved the org.apache.felix.webconsole.jar file to autodeploy/bundles/ folder under the domain1, and also put org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg file into the same folder, then restarted Glassfish, and new username and passwords are fine. 所以我将org.apache.felix.webconsole.jar文件移到domain1下的autodeploy / bundles /文件夹中,并将org.apache.felix.webconsole.internal.servlet.OsgiManager.cfg文件放入同一文件夹中,然后重新启动了Glassfish,并且新的用户名和密码都可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM