Bug 1278426

Summary: Better error message needed for invalid ca-signing-algo option
Product: Red Hat Enterprise Linux 7 Reporter: Kaleem <ksiddiqu>
Component: ipaAssignee: Martin Babinsky <mbabinsk>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: mbasti, rcritten
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ipa-4.4.0-0.el7.1.alpha1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:39:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kaleem 2015-11-05 13:02:00 UTC
Description of problem:
I think there should be a better error message when invalid or empty option used with --ca-signinig-algorithm option.

[root@dhcp207-229 ~]# ipa-server-install --setup-dns --forwarder=10.65.201.89 -r TESTRELM.TEST -a xxxxxxxx -p xxxxxxxx --external-ca -U --ca-signing-algorithm=invalid
Usage: ipa-server-install [options]

ipa-server-install: error: option --ca-signing-algorithm: invalid choice 'invalid' (choose from s, e, t, (, [, ', S, H, A, 2, 5, 6, w, i, t, h, R, S, A, ', ,,  , ', S, H, A, 1, w, i, t, h, R, S, A, ', ,,  , ', S, H, A, 5, 1, 2, w, i, t, h, R, S, A, ', ], ))
[root@dhcp207-229 ~]# 

[root@dhcp207-229 ~]# ipa-server-install --setup-dns --forwarder=10.65.201.89 -r TESTRELM.TEST -a xxxxxxxx -p xxxxxxxx --external-ca -U --ca-signing-algorithm=
Usage: ipa-server-install [options]

ipa-server-install: error: option --ca-signing-algorithm: invalid choice '' (choose from s, e, t, (, [, ', S, H, A, 2, 5, 6, w, i, t, h, R, S, A, ', ,,  , ', S, H, A, 1, w, i, t, h, R, S, A, ', ,,  , ', S, H, A, 5, 1, 2, w, i, t, h, R, S, A, ', ], ))
[root@dhcp207-229 ~]# 

Version-Release number of selected component (if applicable):
[root@dhcp207-229 ~]# rpm -q ipa-server
ipa-server-4.2.0-15.el7.x86_64
[root@dhcp207-229 ~]# 

How reproducible:
Always

Steps to Reproduce:
1. ipa-server-install with invalid ca-signing-algo option.
2.
3.

Actual results:

Usage: ipa-server-install [options]

ipa-server-install: error: option --ca-signing-algorithm: invalid choice '' (choose from s, e, t, (, [, ', S, H, A, 2, 5, 6, w, i, t, h, R, S, A, ', ,,  , ', S, H, A, 1, w, i, t, h, R, S, A, ', ,,  , ', S, H, A, 5, 1, 2, w, i, t, h, R, S, A, ', ], ))


Expected results:
..
Usage: ipa-server-install [options]

ipa-server-install: error: option --ca-signing-algorithm: invalid choice 'invalid' (choose from SHA256withRSA, SHA1withRSA, SHA512withRSA)

Comment 2 Petr Vobornik 2015-11-05 13:25:20 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/5433

Comment 4 Mike McCune 2016-03-28 23:02:11 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 6 Kaleem 2016-09-12 05:56:40 UTC
Verified.

IPA Version:
============
[root@dhcp207-129 ~]# rpm -q ipa-server
ipa-server-4.4.0-10.el7.x86_64
[root@dhcp207-129 ~]# 

console output:
===============

[root@dhcp207-129 ~]# ipa-server-install --setup-dns --auto-forwarders --auto-reverse --hostname=dhcp207-129.testrelm.test -r TESTRELM.TEST -n testrelm.test -p xxxxxxxx -a xxxxxxxx --ip-address=10.65.207.129 --ca-signing-algorithm=invalid -U
Usage: ipa-server-install [options]

ipa-server-install: error: option --ca-signing-algorithm: invalid choice 'invalid' (choose from 'SHA1withRSA', 'SHA256withRSA', 'SHA512withRSA')
[root@dhcp207-129 ~]# ipa-server-install --setup-dns --auto-forwarders --auto-reverse --hostname=dhcp207-129.testrelm.test -r TESTRELM.TEST -n testrelm.test -p xxxxxxxx -a xxxxxxxx --ip-address=10.65.207.129 --ca-signing-algorithm= -U
Usage: ipa-server-install [options]

ipa-server-install: error: option --ca-signing-algorithm: invalid choice '' (choose from 'SHA1withRSA', 'SHA256withRSA', 'SHA512withRSA')
[root@dhcp207-129 ~]#

Comment 8 errata-xmlrpc 2016-11-04 05:39:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2404.html