Access to sensitive attribute in clear text is not allowed error | Weblogic
When you use cleartext passwords in datasource creation in weblogic you might run into following error.
“Access to sensitive attribute in clear text is not allowed due to the setting of ClearTextCredentialAccessEnabled attribute in SecurityConfigurationMBean”
To avoid this error we can reset/Encrypt the password using wlst online or offline mode scripts like below.
WLST online mode script:
In the following script, change the JDBC Data Source-1 with the name of your data source. Also, use your own password:
java weblogic.WLST connect('weblogic','weblogic','t3://localhost:7001') serverConfig() edit() cd('JDBCSystemResources/JDBC Data Source-1/JDBCResource/JDBC Data Source-1/JDBCDriverParams/JDBC Data Source-1') startEdit() cmo.setPassword('password') activate()
WLST offline mode script:
In the following script, change the JDBC Data Source-1 with the name of your data source. Replace the %DomainPath% with your local domain path:
java weblogic.WLST readDomain('%DomainPath%') cd('/JDBCSystemResource/JDBC Data Source-1/JdbcResource/JDBC Data Source-1/JDBCDriverParams/NO_NAME_0') set('PasswordEncrypted','password') updateDomain()
Script Output
Activating all your changes, this may take a while ... The edit lock associated with this edit session is released once the activation is completed. The following non-dynamic attribute(s) have been changed on MBeans that require server re-start: MBean Changed : com.bea:Name=JDBC Data Source-1,Type=weblogic.j2ee.descriptor.wl.JDBCDriverParamsBean,Parent=[WebservicePolicy_domain]/JDBCSystemResources[JDBC Data Source-1],P ath=JDBCResource[JDBC Data Source-1]/JDBCDriverParamsAttributes changed : PasswordEncrypted
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.
These are excellent, concise instructions that really helped me when in a bind. Many thanks!
have a try, thanks