gpt4 book ai didi

integration - 如何将Weblogic的config.xml迁移到多台机器上?

转载 作者:行者123 更新时间:2023-12-04 23:10:43 24 4
gpt4 key购买 nike

我们的开发团队开发了一个在 Weblogic 10.3 上运行的 J2EE 应用程序。每台开发机器都运行自己的 Weblogic 10.3 应用服务器副本。开发环境的Weblogic域最初是在一台机器上创建的,然后使用Weblogic的配置工具(bea10/wlserver_10.3/common/bin/config.cmd)复制到所有机器上。

每个开发机器都有自己的 config.xml 副本。此文件中的所有密码(用于 JDBC 数据源等的密码)都已加密,并且加密显然在每台机器上使用不同的种子,因为相同的密码在不同的机器上具有不同的加密形式。

问题是每隔一段时间 config.xml 需要更新(例如,当添加新的 EJB 时)并且需要在所有机器上应用更新。我们应该怎么做呢?如果我们只是将文件放在 CVS 中并从那里更新其他机器,那么每台机器上的加密密码都会被覆盖。当服务器尝试解密最初在另一台机器上加密的密码短语时,这会导致丑陋的填充异常。

是否有一个 ant 任务(我找不到)或类似的机制来处理正确合并 config.xml 中的更改而不覆盖加密的密码?或者是否可以以某种方式以明文形式指定密码短语并在第一次启动时加密它们(我隐约记得这在以前的版本中是可能的,但在 10.3 中不是)。

使用 Weblogic 的开发团队如何处理这个问题?

BR,

马可

最佳答案

[...] Each development machine has its own copy of config.xml. All the passphrases (those for JDBC datasources etc.) in this file are encrypted ...



是的,WebLogic Server 会加密存储在其域配置 XML 文件中的所有纯文本密码。这是为了防止访问敏感信息。当使用管理控制台或脚本工具输入密码时,它会在存储在配置 XML 文件中之前自动加密。

... and the encryption apparently uses a different seed on each machine since the same password has different encrypted forms on different machines.



关于 encrypt实用程序(来自 Oracle WebLogic Server Java Utilities),文档说:

The weblogic.security.Encrypt encrypts cleartext strings for use with WebLogic Server. The utility uses the encryption service of the current directory, or the encryption service for a specified WebLogic Server domain root directory.

Note: An encrypted string must have been encrypted by the encryption service in the WebLogic Server domain where it will be used. If not, the server will not be able to decrypt the string.



这在文档中没有提到,但是,AFAIK,Weblogic 使用域的密码盐文件( SerializedSystemIni.dat )来加密明文字符串。

[...] If we just put the file in CVS and update the other machines from there the encrypted passwords on each machine would get overwritten.



您可以选择在 VCS 中存储的 config.xml 中使用明文密码(如果这不是问题)。实际上,在 WebLogic Server 9.0 之前,密码会在后续重新启动期间加密。从 WebLogic Server 9.0 开始,仅“开发”域“完全”支持在配置文件中使用明文密码,并且 Weblogic 不会重新加密密码。在这两种情况下,这都可以让人们毫无困难地检查配置文件。

Is there an ant task (I couldn't find one) or a similar mechanism that would take care of correctly merging the changes in config.xml without overwriting the encrypted passwords?...



我不确定这是否直接回答了您的问题,但 Oracle WebLogic Server 提供了 Ant tasks对于大多数(如果不是全部)它的 Java 实用程序。也许你会在那里找到一些有用的东西(查看 Configuring a WebLogic Server Domain Using the wlconfig Ant Task)

Or is it possible to somehow specify the passphrases in plaintext and encrypt them on the first start (I have a faint recollection that this was possible in previous versions but not in 10.3).



正如我上面写的,这是 Weblogic Server 9.0 之前的“默认”行为。我不知道您是否可以在以后的版本中强制执行此行为。当然,你总是可以使用 ant 和 encrypt这样做,但老实说,如果你允许人们看到一次明文密码,我真的不明白事后加密它们的意义。

关于integration - 如何将Weblogic的config.xml迁移到多台机器上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1503964/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com