Skip to content

Commit

Permalink
Remove preop.admin.group param
Browse files Browse the repository at this point in the history
The preop.admin.group param defines the list of admin user's
default groups and provides an undocumented way to customize the
groups during installation, but this param can only be used under
certain installation scenarios. Instead of that, it's better to
use the CLI to change the groups after the installation is done.

The param has been removed and the list of admin user's default
groups has been moved into PKIDeployer.setup_admin_user().
  • Loading branch information
edewata committed Jan 12, 2024
1 parent 3b625f2 commit 6a4648b
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
1 change: 0 additions & 1 deletion base/ca/shared/conf/CS.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ agent.interface.uri=ca/agent/ca
machineName=[pki_hostname]
instanceId=[pki_instance_name]
pidDir=/var/run/pki/tomcat
preop.admin.group=Certificate Manager Agents, Administrators
preop.pin=[pki_one_time_pin]
ca.cert.list=signing,ocsp_signing,sslserver,subsystem,audit_signing
ca.cert.signing.certusage=SSLCA
Expand Down
1 change: 0 additions & 1 deletion base/kra/shared/conf/CS.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ authType=pwd
machineName=[pki_hostname]
instanceId=[pki_instance_name]
pidDir=/var/run/pki/tomcat
preop.admin.group=Data Recovery Manager Agents, Administrators
preop.pin=[pki_one_time_pin]
kra.cert.list=transport,storage,sslserver,subsystem,audit_signing
kra.cert.transport.certusage=SSLClient
Expand Down
1 change: 0 additions & 1 deletion base/ocsp/shared/conf/CS.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ installDate=[pki_install_time]
cs.type=OCSP
admin.interface.uri=ocsp/admin/console/config/wizard
agent.interface.uri=ocsp/agent/ocsp
preop.admin.group=Online Certificate Status Manager Agents, Administrators
cms.product.version=@APPLICATION_VERSION@
cms.passwordlist=internaldb,replicationdb
preop.module.token=Internal Key Storage Token
Expand Down
19 changes: 17 additions & 2 deletions base/server/python/pki/server/deployment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3904,8 +3904,23 @@ def setup_admin_user(self, subsystem, cert_data):
tps_profiles=tps_profiles,
as_current_user=True)

admin_groups = subsystem.config['preop.admin.group']
groups = [x.strip() for x in admin_groups.split(',')]
groups = ['Administrators']

if subsystem.type == 'CA':
groups.append('Certificate Manager Agents')

elif subsystem.type == 'KRA':
groups.append('Data Recovery Manager Agents')

elif subsystem.type == 'OCSP':
groups.append('Online Certificate Status Manager Agents')

elif subsystem.type == 'TKS':
groups.append('Token Key Service Manager Agents')

elif subsystem.type == 'TPS':
groups.append('TPS Agents')
groups.append('TPS Operators')

if subsystem.config.get('securitydomain.select') == 'new':

Expand Down
1 change: 0 additions & 1 deletion base/tks/shared/conf/CS.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pidDir=/var/run/pki/tomcat
installDate=[pki_install_time]
cs.type=TKS
admin.interface.uri=tks/admin/console/config/wizard
preop.admin.group=Token Key Service Manager Agents, Administrators
cms.product.version=@APPLICATION_VERSION@
cms.passwordlist=internaldb,replicationdb
tks.cert.list=sslserver,subsystem,audit_signing
Expand Down
1 change: 0 additions & 1 deletion base/tps/shared/conf/CS.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,6 @@ op.pinReset.userKey.update.symmetricKeys.requiredVersion=1
passwordClass=com.netscape.cmsutil.password.PlainPasswordFile
passwordFile=[pki_instance_path]/conf/password.conf
pidDir=/var/run/pki/tomcat
preop.admin.group=TPS Agents,TPS Operators,Administrators
preop.cert.admin.defaultSigningAlgorithm=SHA256withRSA
preop.cert.admin.dn=uid=admin,cn=admin
preop.cert.admin.keysize.custom_size=2048
Expand Down

0 comments on commit 6a4648b

Please sign in to comment.