I have the following code in a web service deployed on WebLogic 12.2.1. It will retrieve the keystore file name and password from WebLogic configuration.
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");
It is able to retrieve the keystore file name, but when it tries to retrieve the password, the following exception is thrown.
[Management:141302]Access not allowed for Subject: principals=[], on resource Server, action: read, target CustomIdentityKeyStorePassPhrase.
Under the domain's security, I have already enabled "Clear Text Credential Access Enabled".
What else could be wrong?
Thanks in advance.