I am using teiid for creation of multiple datasources of different databases.
The datasource created in standalone-teiid.xml has the password in plain text which is visible to end user.
To encrypt the password, I have used 'SecureIdentityLoginModule' and added the 'security-domain' tag with encrypted password in 'standalone-teiid.xml' manually.
FYI :
<security-domain name="encSecDomain" cache-type="default">
<authentication>
<login-module code="org.picketbox.datasource.security.SecureIdentityLoginModule" flag="required">
<module-option name="username" value="root"/>
<module-option name="password" value="1684ff37be14bb556f7ddf5cfefe2fdd"/>
<module-option name="managedConnectionFactoryName" value="jboss.jca:service=orcl,name=DSMYSQL20191014155518432"/>
</login-module>
</authentication>
</security-domain>
It worked perfectly fine.
The same 'security-domain' tag i need to create programatically through java.
Is there any jboss/teiid utility available for it.
Regards,
Tushar N
The WildFly cli is your best bet. If you really need to go through Java, you can use the DMR layer - which gives you a very abstract graph of the management layer, see WildFly Admin Guide or JBoss DMR |