找回密码,我在部署在WebLogic 12.2.1 Web服务下面的代码。它将从WebLogic配置中检索密钥库文件名和密码。无法从WebLogic配置
InitialContext ic = new InitialContext();
MBeanServer server = (MBeanServer) ic.lookup("java:comp/env/jmx/runtime");
ObjectName runtime = new ObjectName("com.bea:Name=MLMAppSrv01,Type=Server");
Object keyStoreFileName = server.getAttribute(runtime, "CustomIdentityKeyStoreFileName");
Object keyStorePassPhrase = server.getAttribute(runtime, "CustomIdentityKeyStorePassPhrase");
它能够获取密钥库文件名,但是当它试图找回密码,以下异常被抛出。
[Management:141302]Access not allowed for Subject: principals=[], on resource Server, action: read, target CustomIdentityKeyStorePassPhrase.
在域的安全性下,我已经启用了“启用清除文本凭据访问”。
还有什么可能是错误的?
在此先感谢。
在WebLogic服务器启动为使用具有管理员权限的Windows登录ID的服务(可以称之为ID “X”) 。要登录WebLogic控制台,我使用了一个ID(我们称这个ID为“Y”)。是我需要在我的代码“Y”中传递的用户名,是否可以登录WebLogic控制台的相同ID?我如何在我的代码中这样做? – user3573403