#2314 After setting encryption/decryption flags pkidestroy KRA fails
Closed: Fixed Opened by ssidhaye@redhat.com.

While verifying BZ-1258989 I set the following flags in KRA's CS.cfg:

kra.allowEncDecrypt.archival=true
kra.allowEncDecrypt.recovery=true

Once I set these flags, restart the service and
then if I try to uninstall KRA it fails giving me the following error:

[root@shostname]# pkidestroy -s KRA -i FoobarCA
Log file: /var/log/pki/pki-kra-destroy.20160420070344.log
Loading deployment configuration from
/var/lib/pki/FoobarCA/kra/registry/kra/deployment.cfg.
Traceback (most recent call last):
  File "/sbin/pkidestroy", line 280, in <module>
    main(sys.argv)
  File "/sbin/pkidestroy", line 245, in main
    parser.compose_pki_master_dictionary()
  File "/usr/lib/python2.7/site-packages/pki/server/deployment/pkiparser.py",
line 586, in compose_pki_master_dictionary
    instance.load()
  File "/usr/lib/python2.7/site-packages/pki/server/__init__.py", line 490, in
load
    subsystem.load()
  File "/usr/lib/python2.7/site-packages/pki/server/__init__.py", line 129, in
load
    value = parts[1]
IndexError: list index out of range

If I modify any existing flags and then try to pkidestroy KRA it works,
but not if I set the above two flags.

Steps to Reproduce:

1. Setup CA and KRA
2. In KRA's CS.cfg set the following flags:
   kra.allowEncDecrypt.archival=true
   kra.allowEncDecrypt.recovery=true
3. Restart service
4. try uninstalling KRA (pkidestroy)

Actual results:

KRA uninstall fails with the error:
IndexError: list index out of range

Expected results:

KRA uninstalls successfully without any errors

Additional info:

If I modify any existing flags and then try to pkidestroy KRA it works,
but not if I set the above encryption/decryption flags.
Tried both with interactive as well as silent install.

Per Bug Triage of 05/03/2016: NEEDS TRIAGE

If confirmed to be an issue, then this ticket should be moved to 10.3.2.

The problem disappeared after removing blank and comment lines. To help troubleshooting the code can be fixed to show which line causes parsing problem, and also to ignore blank and comment lines.

Fixed in master:

  • f1eef2654de9d2c32f25db4b2d7dccd7fa49b26a

Metadata Update from @ssidhaye@redhat.com:
- Issue set to the milestone: 10.3.2

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/2434

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata