summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristina Fu <cfu@redhat.com>2014-06-03 16:42:10 -0700
committerChristina Fu <cfu@redhat.com>2014-06-04 10:29:09 -0700
commite1809a3c6df50ed2e8a35ab7108a3a057e4fcaff (patch)
tree666e03d865ac966f0a36ab1aeed3fe1c25b52e00
parent5b7c76832dc72c85d9dd9db16f861f3283fa7eb0 (diff)
downloadpki-e1809a3c6df50ed2e8a35ab7108a3a057e4fcaff.tar.gz
pki-e1809a3c6df50ed2e8a35ab7108a3a057e4fcaff.tar.xz
pki-e1809a3c6df50ed2e8a35ab7108a3a057e4fcaff.zip
TPS Token Profile Resolver Framework - part2
-rw-r--r--base/server/etc/default.cfg1
-rw-r--r--base/server/python/pki/server/deployment/pkiparser.py4
-rw-r--r--base/server/python/pki/server/deployment/scriptlets/slot_substitution.py3
-rw-r--r--base/tps-tomcat/shared/conf/CS.cfg.in5
-rw-r--r--base/tps-tomcat/src/org/dogtagpki/server/tps/profile/TokenProfileParams.java6
5 files changed, 14 insertions, 5 deletions
diff --git a/base/server/etc/default.cfg b/base/server/etc/default.cfg
index 9f6859b76..87c197baa 100644
--- a/base/server/etc/default.cfg
+++ b/base/server/etc/default.cfg
@@ -607,6 +607,7 @@ pki_import_shared_secret=False
pki_share_db=True
pki_share_dbuser_dn=uid=pkidbuser,ou=people,o=%(pki_instance_name)s-CA
pki_source_phone_home_xml=/usr/share/pki/%(pki_subsystem_type)s/conf/phoneHome.xml
+pki_source_registry_cfg=%(pki_source_conf_path)s/registry.cfg
# Paths
# These are used in the processing of pkispawn and are not supposed
diff --git a/base/server/python/pki/server/deployment/pkiparser.py b/base/server/python/pki/server/deployment/pkiparser.py
index 8fb29dedc..2759ceeef 100644
--- a/base/server/python/pki/server/deployment/pkiparser.py
+++ b/base/server/python/pki/server/deployment/pkiparser.py
@@ -712,6 +712,10 @@ class PKIConfigParser:
['pki_subsystem_configuration_path'],
"transportCert.profile")
elif self.pki_master_dict['pki_subsystem'] == "TPS":
+ self.pki_master_dict['pki_target_registry_cfg'] = \
+ os.path.join(self.pki_master_dict\
+ ['pki_subsystem_configuration_path'],
+ "registry.cfg")
self.pki_master_dict['pki_target_phone_home_xml'] = \
os.path.join(
self.pki_master_dict['pki_subsystem_configuration_path'],
diff --git a/base/server/python/pki/server/deployment/scriptlets/slot_substitution.py b/base/server/python/pki/server/deployment/scriptlets/slot_substitution.py
index 1c13bdbd1..88bdf94b7 100644
--- a/base/server/python/pki/server/deployment/scriptlets/slot_substitution.py
+++ b/base/server/python/pki/server/deployment/scriptlets/slot_substitution.py
@@ -94,6 +94,9 @@ class PkiScriptlet(pkiscriptlet.AbstractBasePkiScriptlet):
deployer.master_dict['pki_target_profileselect_template'])
elif deployer.master_dict['pki_subsystem'] == "TPS":
deployer.file.copy_with_slot_substitution(
+ deployer.master_dict['pki_source_registry_cfg'],
+ deployer.master_dict['pki_target_registry_cfg'])
+ deployer.file.copy_with_slot_substitution(
deployer.master_dict['pki_source_phone_home_xml'],
deployer.master_dict['pki_target_phone_home_xml'])
return self.rv
diff --git a/base/tps-tomcat/shared/conf/CS.cfg.in b/base/tps-tomcat/shared/conf/CS.cfg.in
index 90e90a456..b4b19415e 100644
--- a/base/tps-tomcat/shared/conf/CS.cfg.in
+++ b/base/tps-tomcat/shared/conf/CS.cfg.in
@@ -1099,7 +1099,8 @@ tokenProfileResolver.formatMappingResolver.mapping.3.filter.tokenATR=
tokenProfileResolver.formatMappingResolver.mapping.3.filter.tokenCUID.end=
tokenProfileResolver.formatMappingResolver.mapping.3.filter.tokenCUID.start=
tokenProfileResolver.formatMappingResolver.mapping.3.filter.tokenType=userKey
-tokenProfileResolver.formatMappingResolver.mapping.3.target.tokenType=userKeytokenProfileResolver.formatMappingResolver.mapping.4.filter.appletMajorVersion=
+tokenProfileResolver.formatMappingResolver.mapping.3.target.tokenType=userKey
+tokenProfileResolver.formatMappingResolver.mapping.4.filter.appletMajorVersion=
tokenProfileResolver.formatMappingResolver.mapping.4.filter.appletMinorVersion=
tokenProfileResolver.formatMappingResolver.mapping.4.filter.tokenATR=
tokenProfileResolver.formatMappingResolver.mapping.4.filter.tokenCUID.end=
@@ -1200,7 +1201,7 @@ target.configure.list=Profiles,Subsystem_Connections,Profile_Mappings,Authentica
target.Generals.displayname=General
target.Generals.pattern=^applet\..*\|^general\..*\|^failover.pod.enable\|^channel\..*
target.Profile_Mappings.displayname=Token Profile Mapping Resolvers
-target.Profile_Mappings.list=enrollProfileResolver,formatProfileResolver,pinResetProfileResolver
+target.Profile_Mappings.list=enrollMappingResolver,formatMappingResolver,pinResetMappingResolver
target.Profile_Mappings.pattern=tokenProfileResolver\.$name\.mapping\..*
target.Profiles.displayname=Token Profile
target.Profiles.list=userKey,soKey,soCleanUserToken,soUserKey,cleanToken,soCleanSoToken,tokenKey
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/profile/TokenProfileParams.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/profile/TokenProfileParams.java
index b4789373e..1dda47ad8 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/profile/TokenProfileParams.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/profile/TokenProfileParams.java
@@ -80,7 +80,7 @@ public class TokenProfileParams {
CMS.debug("TokenProfileParams.getString: param null:"+ name);
throw new TPSException (
"TokenProfileParams.getString: param null:"+ name,
- TPSStatus.STATUS_ERROR_DEFAULT_TOKENTYPE_NOT_FOUND);
+ TPSStatus.STATUS_ERROR_DEFAULT_TOKENTYPE_PARAMS_NOT_FOUND);
}
return val;
}
@@ -98,7 +98,7 @@ public class TokenProfileParams {
CMS.debug("TokenProfileParams.getInt: param null:"+ name);
throw new TPSException (
"TokenProfileParams.getInt: param null:"+ name,
- TPSStatus.STATUS_ERROR_DEFAULT_TOKENTYPE_NOT_FOUND);
+ TPSStatus.STATUS_ERROR_DEFAULT_TOKENTYPE_PARAMS_NOT_FOUND);
}
try {
int intVal = Integer.parseInt(val);
@@ -107,7 +107,7 @@ public class TokenProfileParams {
CMS.debug("TokenProfileParams.getInt: param "+ name + "=" + val + e);
throw new TPSException (
"TokenProfileParams.getInt: param major_version:"+ e,
- TPSStatus.STATUS_ERROR_DEFAULT_TOKENTYPE_NOT_FOUND);
+ TPSStatus.STATUS_ERROR_MISCONFIGURATION);
}
}