简体   繁体   English

在JAVA中存储IBM TAM连接参数的最佳方法是什么?

[英]what would be the best way to store IBM TAM connection parameters in JAVA?

what would be the best way to store IBM TAM connection parameters in JAVA? 在JAVA中存储IBM TAM连接参数的最佳方法是什么? My application is built on JAVA spring and uses TAM for access management. 我的应用程序基于JAVA spring构建,并使用TAM进行访问管理。 Inorder to connect to IBM TAM i have a java file that gets value from property file which stores the following values application name, configuration url, registry suffix,tam admin username and tam admin paswword.I dont want to store all these values in java code or property file. 为了连接到IBM TAM,我有一个Java文件,它从属性文件中获取值,该文件存储以下值:应用程序名称,配置URL,注册表后缀,tam admin用户名和tam admin paswword。我不想将所有这些值存储在Java代码中或属性文件。 Please suggest me whether i can store it in the web application server like storing connection strings. 请建议我是否可以像存储连接字符串一样将其存储在Web应用程序服务器中。

You can use the server certificate within the configuration file. 您可以在配置文件中使用服务器证书。 You will always need to specify the configuration file at minimum. 您将始终需要至少指定配置文件。 It should look something like this: 它看起来应该像这样:

Locale myLocale = new Locale("ENGLISH", "US");
PDContext myContext = new PDContext(myLocale, configFileURL);

You will need to create your configuration file using svrsslcfg: 您将需要使用svrsslcfg创建配置文件:

java com.tivoli.pd.jcfg.SvrSslCfg -action config
-admin_id sec_master-admin_pwd secpw
-appsvr_id PDPermissionjapp -appsvr_pwd pw -host jsys.myco.com
-mode remote -port 999 -policysvr ampolicy.myco.com:7135:1
-authzsvr amazn.myco.com:7136:1 -cfg_file c:/am/config_file.conf
-key_file c:/am/keystore_file.ks -domain mydomain -cfg_action create
-certrefresh true

Typically in the environment I administer our developers use the PDContext method using the username+password+config file. 通常,在我管理开发人员的环境中,使用通过用户名+密码+配置文件的PDContext方法。 We have never used the certificate method. 我们从未使用过证书方法。 I believe if you use the certificate method, the application would connect as the server's user account that is created when you use the svrsslcfg command. 我相信,如果您使用证书方法,则该应用程序将作为使用svrsslcfg命令时创建的服务器用户帐户进行连接。 That account would need appropriate permissions within TAM to achieve what it needs to. 该帐户在TAM中需要适当的权限才能实现所需的权限。

At the minimum, you will need to specify somewhere to store the configuration URL. 至少,您需要指定一个位置来存储配置URL。 I would strongly encourage you not to hard code the value as it limits the administrators that must maintain the application long term. 我强烈建议您不要对值进行硬编码,因为它限制了必须长期维护应用程序的管理员。 You may also need a place to store the username+password if you decide that you need to connect as specific user and not the server's TAM user account. 如果您决定需要以特定用户而不是服务器的TAM用户帐户连接,则可能还需要存储用户名+密码的位置。

Refer to this document for svrsslcfg options to create the configuration file: http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.isam.doc_70/ameb_authJava_guide_pdf.pdf 有关创建配置文件的svrsslcfg选项,请参考此文档: http : //publib.boulder.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.isam.doc_70/ameb_authJava_guide_pdf.pdf

Look at this reference guide for information on how to use PDContext: https://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.isam.doc_70/ameb_AdminJava_guide_pdf.pdf 请参阅此参考指南以获取有关如何使用PDContext的信息: https ://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.isam.doc_70/ameb_AdminJava_guide_pdf.pdf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM