How to hash IBM MobileFirst SQL adapter username password url and port in xml file?

最后都变了- 提交于 2019-12-19 11:50:43

问题


I'm using a IBM MobileFirst SQL adapter to get data from a AWS Oracle RDS.

In order to connect to the sql adapter, we need to provide the username, password, url and port. The connection works, however, how should I hash it so that no one can read it? This is to make it more secure. Is this possible?

<driverClass>oracle.jdbc.driver.OracleDriver</driverClass>
   <url>jdbc:oracle:thin:@xxx.rds.amazonaws.com:1525/SchemaSample</url>
            <user>Username</user>
            <password>Password</password>
</dataSourceDefinition>

回答1:


First, you're using a very old build of 7.1 and your team should consider updating both the client and server versions.

Second, just to clarify, you don't "connect to the sql adapter". Your client sends a request to the MobileFirst Server, to use the adapter in order to connect to the AWS Oracle RDS. It is the request of the adapter to the AWS that you want its properties hashed, or encrypted.

As for encrypting properties, this depends on the application server you've installed MobileFirst Server on (WAS, WAS liberty, or Tomcat). In general, the process is as follows:

  • If you're using Tomcat, you can create a custom property in the worklight.properties file, encrypt it as instructed here and then re-deploy the .war file.

  • If you're using WAS or WAS liberty, you can also create such custom property in worklight.properties, and then expose it as a JNDI entry in the application server. You can then encrypt it using the encryption tools provided by each application server.

    See here for an example how to set it up: https://stackoverflow.com/a/25159260/1530814

    Once you have it setup, you can now take care of the encryption by following the documentation of the tool for your application server.

    • Encryption tools by each application server (search for "Encoding the JDNI properties")


来源:https://stackoverflow.com/questions/40144612/how-to-hash-ibm-mobilefirst-sql-adapter-username-password-url-and-port-in-xml-fi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!