diff options
| author | Matthew Harmsen <mharmsen@redhat.com> | 2013-09-06 19:11:47 -0700 |
|---|---|---|
| committer | Matthew Harmsen <mharmsen@redhat.com> | 2013-09-16 12:17:22 -0700 |
| commit | 51920f9c43e5a6ec188a8b042c170953a0b00e07 (patch) | |
| tree | 030b5b36bf841529bbb67c1e662c5506ecf149ae /base/server/python | |
| parent | 9c3cc5e955e9101ffb4e59282d548105dcc42664 (diff) | |
| download | pki-51920f9c43e5a6ec188a8b042c170953a0b00e07.tar.gz pki-51920f9c43e5a6ec188a8b042c170953a0b00e07.tar.xz pki-51920f9c43e5a6ec188a8b042c170953a0b00e07.zip | |
TRAC Ticket #707 - Do not "require" the following pkispawn parameters for GUI-based configuration
Diffstat (limited to 'base/server/python')
| -rw-r--r-- | base/server/python/pki/server/deployment/pkihelper.py | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/base/server/python/pki/server/deployment/pkihelper.py b/base/server/python/pki/server/deployment/pkihelper.py index 9bbe81010..9257cbfb8 100644 --- a/base/server/python/pki/server/deployment/pkihelper.py +++ b/base/server/python/pki/server/deployment/pkihelper.py @@ -452,15 +452,17 @@ class ConfigurationFile: def verify_sensitive_data(self): # Silently verify the existence of 'sensitive' data if self.master_dict['pki_subsystem'] in config.PKI_TOMCAT_SUBSYSTEMS: - # Verify existence of Directory Server Password (ALWAYS) - if not self.master_dict.has_key('pki_ds_password') or\ - not len(self.master_dict['pki_ds_password']): - config.pki_log.error( - log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2, - "pki_ds_password", - self.master_dict['pki_user_deployment_cfg'], - extra=config.PKI_INDENTATION_LEVEL_2) - raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_ds_password", + # Verify existence of Directory Server Password + # (unless configuration will not be automatically executed) + if not config.str2bool(self.master_dict['pki_skip_configuration']): + if not self.master_dict.has_key('pki_ds_password') or\ + not len(self.master_dict['pki_ds_password']): + config.pki_log.error( + log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2, + "pki_ds_password", + self.master_dict['pki_user_deployment_cfg'], + extra=config.PKI_INDENTATION_LEVEL_2) + raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_ds_password", self.master_dict['pki_user_deployment_cfg'])) # Verify existence of Admin Password (except for Clones) if not config.str2bool(self.master_dict['pki_clone']): @@ -515,19 +517,21 @@ class ConfigurationFile: extra=config.PKI_INDENTATION_LEVEL_2) raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_clone_pkcs12_password", self.master_dict['pki_user_deployment_cfg'])) - # Verify existence of Security Domain Password File - # (ONLY for Clones, KRA, OCSP, TKS, TPS, or Subordinate CA) + # Verify existence of Security Domain Password + # (ONLY for Clones, KRA, OCSP, TKS, TPS, or Subordinate CA + # that will be automatically configured) if config.str2bool(self.master_dict['pki_clone']) or\ not self.master_dict['pki_subsystem'] == "CA" or\ config.str2bool(self.master_dict['pki_subordinate']): - if not self.master_dict.has_key('pki_security_domain_password') or\ - not len(self.master_dict['pki_security_domain_password']): - config.pki_log.error( - log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2, - "pki_security_domain_password", - self.master_dict['pki_user_deployment_cfg'], - extra=config.PKI_INDENTATION_LEVEL_2) - raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_security_domain_password", + if not config.str2bool(self.master_dict['pki_skip_configuration']): + if not self.master_dict.has_key('pki_security_domain_password') or\ + not len(self.master_dict['pki_security_domain_password']): + config.pki_log.error( + log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2, + "pki_security_domain_password", + self.master_dict['pki_user_deployment_cfg'], + extra=config.PKI_INDENTATION_LEVEL_2) + raise Exception(log.PKIHELPER_UNDEFINED_CONFIGURATION_FILE_ENTRY_2 % ("pki_security_domain_password", self.master_dict['pki_user_deployment_cfg'])) # If required, verify existence of Token Password if not self.master_dict['pki_token_name'] == "internal": |
