#3194 No validation on status while add tps-connector-add
Closed: migrated 3 years ago by dmoluguw. Opened 3 years ago by dmoluguw.

Description of problem:

While adding tps connector using tps-connector-add cli obseve that there is no validation on status cli which create further problem while enable,disable and deleting the connector.

Version-Release number of selected component (if applicable):

[root@pki1 ~]# rpm -qi pki-tps
Name        : pki-tps
Version     : 10.5.9
Release     : 10.el7pki
Architecture: x86_64
Install Date: Monday 31 December 2018 01:03:33 AM EST
Group       : System Environment/Daemons
Size        : 1852506
License     : GPLv2
Signature   : RSA/SHA256, Monday 17 December 2018 08:41:13 PM EST, Key ID 199e2f91fd431d51
Source RPM  : pki-core-10.5.9-10.el7pki.src.rpm
Build Date  : Monday 17 December 2018 08:05:23 PM EST
Build Host  : x86-037.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://pki.fedoraproject.org/
Summary     : Certificate System - Token Processing Service

How reproducible:

# pki -d /opt/pki/certdb/ -c secret -p 25080 -n "TPS_AdminV" tps-connector-add --input tpsconnadd.xml
-----------------------
Added connector "test2"
-----------------------
  Connector ID: test2
  Status: abcEnabledxyz
  Properties:
    tps.connector.test2.enable: true
    tps.connector.test2.host: server.example.com
    tps.connector.test2.maxHttpConns: 15
    tps.connector.test2.minHttpConns: 1
    tps.connector.test2.nickName: subsystemCert cert-pki-tomcat
    tps.connector.test2.port: 8443
    tps.connector.test2.timeout: 30
    tps.connector.test2.uri.enrollment: /ca/ee/ca/profileSubmitSSLClient
    tps.connector.test2.uri.getcert: /ca/ee/ca/displayBySerial
    tps.connector.test2.uri.renewal: /ca/ee/ca/profileSubmitSSLClient
    tps.connector.test2.uri.revoke: /ca/ee/subsystem/ca/doRevoke
    tps.connector.test2.uri.unrevoke: /ca/ee/subsystem/ca/doUnrevoke

# pki -d /opt/pki/certdb/ -c secret -p 25080 -n "TPS_AdminV" tps-connector-mod test2 --action disable
BadRequestException: Invalid connector status: abcEnabledxyz

# pki -d /opt/pki/certdb/ -c secret -p 25080 -n "TPS_AdminV" tps-connector-mod test2 --action enable
BadRequestException: Invalid connector status: abcEnabledxyz

# pki -d /opt/pki/certdb/ -c secret -p 25080 -n "TPS_AdminV" tps-connector-del test2
ForbiddenException: Unable to delete connector test2; connector not disabled

Steps to Reproduce:

1.# pki -d /opt/pki/certdb/ -c secret -p 25080 -n "TPS_AdminV" tps-connector-add --input tpsconnadd.xml
2.# pki -d /opt/pki/certdb/ -c secret -p 25080 -n "TPS_AdminV" tps-connector-mod test2 --action disable
3.# pki -d /opt/pki/certdb/ -c secret -p 25080 -n "TPS_AdminV" tps-connector-mod test2 --action enable

Actual results:

Success with wrong paramter

Expected results:

Should failed with error


Metadata Update from @dmoluguw:
- Custom field component adjusted to None
- Custom field feature adjusted to None
- Custom field origin adjusted to None
- Custom field proposedmilestone adjusted to None
- Custom field proposedpriority adjusted to None
- Custom field reviewer adjusted to None
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1667303
- Custom field type adjusted to None
- Custom field version adjusted to None

3 years ago

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/3311

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 Update from @dmoluguw:
- Issue close_status updated to: migrated
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata