Bug 718015 - ipa pwpolicy inconsistency in error messages
Summary: ipa pwpolicy inconsistency in error messages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 756082
TreeView+ depends on / blocked
 
Reported: 2011-06-30 16:53 UTC by Jenny Severance
Modified: 2015-01-04 23:49 UTC (History)
3 users (show)

Fixed In Version: ipa-2.2.0-5.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 13:13:59 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0819 normal SHIPPED_LIVE ipa bug fix and enhancement update 2012-06-19 20:34:17 UTC

Description Jenny Severance 2011-06-30 16:53:21 UTC
Description of problem:

The error message for setting max failures to a negative number references the user friendly option "maxfail" even when using setattr and knowing the real attribute name.  However, the error message for setting max failures to an invalid character references the attribute name even when using the user friendly option "maxfail".

# ipa pwpolicy-mod --setattr=krbpwdmaxfailure=-1
ipa: ERROR: invalid 'maxfail': must be at least 0

# ipa pwpolicy-mod --maxfail=-1
ipa: ERROR: invalid 'maxfail': must be at least 0

############################################################################

# ipa pwpolicy-mod --maxfail=-abc
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer

# ipa pwpolicy-mod --setattr=krbpwdmaxfailure=adf
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer

It would prolly be better to reference what the command was executed with as to not be confusing.


Version-Release number of selected component (if applicable):
ipa-server-2.0.99-2.20110629T0200zgit66eeace.el6.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jenny Severance 2011-06-30 18:41:41 UTC
Looks like a framework issue ... ?

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Max Failures Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [14:37:00] ::  Executing: ipa pwpolicy-mod --maxfail=jwy
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer
:: [14:37:02] ::  "ipa pwpolicy-mod --maxfail=jwy" failed as expected.
:: [14:37:03] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer  EXP: ipa: ERROR: invalid 'maxfail': must be an integer
:: [   FAIL   ] :: Expect failure with maxfail set to [jwy] (Expected 0, got 1)
:: [14:37:04] ::  Executing: ipa pwpolicy-mod --maxfail=t
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer
:: [14:37:05] ::  "ipa pwpolicy-mod --maxfail=t" failed as expected.
:: [14:37:07] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer  EXP: ipa: ERROR: invalid 'maxfail': must be an integer
:: [   FAIL   ] :: Expect failure with maxfail set to [t] (Expected 0, got 1)
:: [14:37:07] ::  Executing: ipa pwpolicy-mod --maxfail=_
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer
:: [14:37:09] ::  "ipa pwpolicy-mod --maxfail=_" failed as expected.
:: [14:37:11] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer  EXP: ipa: ERROR: invalid 'maxfail': must be an integer
:: [   FAIL   ] :: Expect failure with maxfail set to [_] (Expected 0, got 1)



::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Failure Interval Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [14:37:57] ::  Executing: ipa pwpolicy-mod --failinterval=1avc
ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer
:: [14:37:59] ::  "ipa pwpolicy-mod --failinterval=1avc" failed as expected.
:: [14:38:00] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer  EXP: ipa: ERROR: invalid 'failinterval': must be an integer
:: [   FAIL   ] :: Expect failure with failinterval set to [1avc] (Expected 0, got 1)
:: [14:38:01] ::  Executing: ipa pwpolicy-mod --failinterval=jsdljo97
ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer
:: [14:38:02] ::  "ipa pwpolicy-mod --failinterval=jsdljo97" failed as expected.
:: [14:38:04] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer  EXP: ipa: ERROR: invalid 'failinterval': must be an integer
:: [   FAIL   ] :: Expect failure with failinterval set to [jsdljo97] (Expected 0, got 1)
:: [14:38:04] ::  Executing: ipa pwpolicy-mod --failinterval=B
ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer
:: [14:38:06] ::  "ipa pwpolicy-mod --failinterval=B" failed as expected.
:: [14:38:08] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer  EXP: ipa: ERROR: invalid 'failinterval': must be an integer
:: [   FAIL   ] :: Expect failure with failinterval set to [B] (Expected 0, got 1)


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Lock Out Time Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [14:38:55] ::  Executing: ipa pwpolicy-mod --lockouttime=T
ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer
:: [14:38:57] ::  "ipa pwpolicy-mod --lockouttime=T" failed as expected.
:: [14:38:58] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer  EXP: ipa: ERROR: invalid 'lockouttime': must be an integer
:: [   FAIL   ] :: Expect failure with lockouttime set to [T] (Expected 0, got 1)
:: [14:38:59] ::  Executing: ipa pwpolicy-mod --lockouttime=pdsw
ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer
:: [14:39:00] ::  "ipa pwpolicy-mod --lockouttime=pdsw" failed as expected.
:: [14:39:02] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer  EXP: ipa: ERROR: invalid 'lockouttime': must be an integer
:: [   FAIL   ] :: Expect failure with lockouttime set to [pdsw] (Expected 0, got 1)
:: [14:39:02] ::  Executing: ipa pwpolicy-mod --lockouttime=oiwiouuiy9869
ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer
:: [14:39:04] ::  "ipa pwpolicy-mod --lockouttime=oiwiouuiy9869" failed as expected.
:: [14:39:06] ::  ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer  EXP: ipa: ERROR: invalid 'lockouttime': must be an integer
:: [   FAIL   ] :: Expect failure with lockouttime set to [oiwiouuiy9869] (Expected 0, got 1)

Comment 2 Rob Crittenden 2011-06-30 19:47:35 UTC
Wait, the second comment implies that it is working as the first comment has requested, am I reading that right?

https://fedorahosted.org/freeipa/ticket/1418

Comment 3 Jenny Severance 2011-06-30 19:58:03 UTC
no .. when using --flag_option ... I expect the error message to reference 
'flag_option'  not 'attribute_name'

All three of the new options (well not so new but recently added) are behaving this way when testing invalid characters.

Comment 4 Jenny Severance 2011-07-12 15:17:09 UTC
not a show stopper and can be deferred to 6.3, resetting flags

Comment 5 Namita Soman 2011-09-09 14:20:36 UTC
3.0 Bug triage: Retest.
Changes were made, and this might be addressed

Comment 6 Namita Soman 2011-09-23 12:02:27 UTC
retested on ipa-server-2.1.1-4.el6.x86_64, and this issue still exists

Comment 7 Rob Crittenden 2012-01-05 16:35:16 UTC
Fixed in master by some other change. These tests now work as expected.

Comment 9 Jenny Severance 2012-03-12 19:58:06 UTC
Failed verification

If you specify --maxfail (flag option) error message references the attribute krbpwdmaxfailure


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Max Failures Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [15:19:22] ::  Executing: ipa pwpolicy-mod --maxfail=jwy
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer
:: [15:19:23] ::  "ipa pwpolicy-mod --maxfail=jwy" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer  EXP: ipa: ERROR: invalid 'maxfail': must be an integer 
:: [   FAIL   ] :: Expect failure with maxfail set to [jwy] (Expected 0, got 1)
:: [15:19:24] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [15:19:24] ::  Executing: ipa pwpolicy-mod --maxfail=t
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer
:: [15:19:25] ::  "ipa pwpolicy-mod --maxfail=t" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer  EXP: ipa: ERROR: invalid 'maxfail': must be an integer 
:: [   FAIL   ] :: Expect failure with maxfail set to [t] (Expected 0, got 1)
:: [15:19:26] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [15:19:27] ::  Executing: ipa pwpolicy-mod --maxfail=_
ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer
:: [15:19:27] ::  "ipa pwpolicy-mod --maxfail=_" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdmaxfailure': must be an integer  EXP: ipa: ERROR: invalid 'maxfail': must be an integer 
:: [   FAIL   ] :: Expect failure with maxfail set to [_] (Expected 0, got 1)
:: [15:19:28] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015\

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Failure Interval Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Executing: ipa pwpolicy-mod --failinterval=1avc
:: [   LOG    ] :: "ipa pwpolicy-mod --failinterval=1avc" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer  EXP: ipa: ERROR: invalid 'failinterval': must be an integer 
:: [   FAIL   ] :: Expect failure with failinterval set to [1avc] (Expected 0, got 1)
:: [   LOG    ] :: Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [   LOG    ] :: Executing: ipa pwpolicy-mod --failinterval=jsdljo97
:: [   LOG    ] :: "ipa pwpolicy-mod --failinterval=jsdljo97" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer  EXP: ipa: ERROR: invalid 'failinterval': must be an integer 
:: [   FAIL   ] :: Expect failure with failinterval set to [jsdljo97] (Expected 0, got 1)
:: [   LOG    ] :: Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [   LOG    ] :: Executing: ipa pwpolicy-mod --failinterval=B
:: [   LOG    ] :: "ipa pwpolicy-mod --failinterval=B" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdfailurecountinterval': must be an integer  EXP: ipa: ERROR: invalid 'failinterval': must be an integer 
:: [   FAIL   ] :: Expect failure with failinterval set to [B] (Expected 0, got 1)
:: [   LOG    ] :: Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [   LOG    ] :: Duration: 7s
:: [   LOG    ] :: Assertions: 0 good, 6 bad
:: [   FAIL   ] :: RESULT: Failure Interval Negative Test - Invalid Characters

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Lock Out Time Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [15:56:50] ::  Executing: ipa pwpolicy-mod --lockouttime=T
ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer
:: [15:56:51] ::  "ipa pwpolicy-mod --lockouttime=T" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer  EXP: ipa: ERROR: invalid 'lockouttime': must be an integer 
:: [   FAIL   ] :: Expect failure with lockouttime set to [T] (Expected 0, got 1)
:: [15:56:52] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [15:56:52] ::  Executing: ipa pwpolicy-mod --lockouttime=pdsw
ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer
:: [15:56:53] ::  "ipa pwpolicy-mod --lockouttime=pdsw" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer  EXP: ipa: ERROR: invalid 'lockouttime': must be an integer 
:: [   FAIL   ] :: Expect failure with lockouttime set to [pdsw] (Expected 0, got 1)
:: [15:56:54] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [15:56:54] ::  Executing: ipa pwpolicy-mod --lockouttime=oiwiouuiy9869
ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer
:: [15:56:55] ::  "ipa pwpolicy-mod --lockouttime=oiwiouuiy9869" failed as expected.
:: [   FAIL   ] :: ERROR: Message not as expected. GOT: ipa: ERROR: invalid 'krbpwdlockoutduration': must be an integer  EXP: ipa: ERROR: invalid 'lockouttime': must be an integer 
:: [   FAIL   ] :: Expect failure with lockouttime set to [oiwiouuiy9869] (Expected 0, got 1)
:: [15:56:56] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015

version :: 

ipa-server-2.2.0-3.el6.x86_64

Comment 12 Jenny Severance 2012-03-29 20:44:07 UTC
verified ::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Max Failures Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:40:53] ::  Executing: ipa pwpolicy-mod --maxfail=jwy
ipa: ERROR: invalid 'maxfail': must be an integer
:: [16:40:54] ::  "ipa pwpolicy-mod --maxfail=jwy" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'maxfail': must be an integer
:: [   PASS   ] :: Expect failure with maxfail set to [jwy]
:: [16:40:56] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [16:40:56] ::  Executing: ipa pwpolicy-mod --maxfail=t
ipa: ERROR: invalid 'maxfail': must be an integer
:: [16:40:57] ::  "ipa pwpolicy-mod --maxfail=t" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'maxfail': must be an integer
:: [   PASS   ] :: Expect failure with maxfail set to [t]
:: [16:40:58] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [16:40:58] ::  Executing: ipa pwpolicy-mod --maxfail=_
ipa: ERROR: invalid 'maxfail': must be an integer
:: [16:40:59] ::  "ipa pwpolicy-mod --maxfail=_" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'maxfail': must be an integer
:: [   PASS   ] :: Expect failure with maxfail set to [_]
:: [16:41:00] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Failure Interval Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:42:04] ::  Executing: ipa pwpolicy-mod --failinterval=1avc
ipa: ERROR: invalid 'failinterval': must be an integer
:: [16:42:05] ::  "ipa pwpolicy-mod --failinterval=1avc" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'failinterval': must be an integer
:: [   PASS   ] :: Expect failure with failinterval set to [1avc]
:: [16:42:06] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [16:42:06] ::  Executing: ipa pwpolicy-mod --failinterval=jsdljo97
ipa: ERROR: invalid 'failinterval': must be an integer
:: [16:42:07] ::  "ipa pwpolicy-mod --failinterval=jsdljo97" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'failinterval': must be an integer
:: [   PASS   ] :: Expect failure with failinterval set to [jsdljo97]
:: [16:42:08] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [16:42:09] ::  Executing: ipa pwpolicy-mod --failinterval=B
ipa: ERROR: invalid 'failinterval': must be an integer
:: [16:42:10] ::  "ipa pwpolicy-mod --failinterval=B" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'failinterval': must be an integer
:: [   PASS   ] :: Expect failure with failinterval set to [B]
:: [16:42:11] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Lock Out Time Negative Test - Invalid Characters
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [16:43:14] ::  Executing: ipa pwpolicy-mod --lockouttime=T
ipa: ERROR: invalid 'lockouttime': must be an integer
:: [16:43:15] ::  "ipa pwpolicy-mod --lockouttime=T" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'lockouttime': must be an integer
:: [   PASS   ] :: Expect failure with lockouttime set to [T]
:: [16:43:17] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [16:43:17] ::  Executing: ipa pwpolicy-mod --lockouttime=pdsw
ipa: ERROR: invalid 'lockouttime': must be an integer
:: [16:43:18] ::  "ipa pwpolicy-mod --lockouttime=pdsw" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'lockouttime': must be an integer
:: [   PASS   ] :: Expect failure with lockouttime set to [pdsw]
:: [16:43:19] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015
:: [16:43:19] ::  Executing: ipa pwpolicy-mod --lockouttime=oiwiouuiy9869
ipa: ERROR: invalid 'lockouttime': must be an integer
:: [16:43:20] ::  "ipa pwpolicy-mod --lockouttime=oiwiouuiy9869" failed as expected.
:: [   PASS   ] :: Error message as expected: ipa: ERROR: invalid 'lockouttime': must be an integer
:: [   PASS   ] :: Expect failure with lockouttime set to [oiwiouuiy9869]
:: [16:43:22] ::  Verifies https://bugzilla.redhat.com/show_bug.cgi?id=718015


version ::
ipa-server-2.2.0-5.el6.x86_64

Comment 13 Martin Kosek 2012-04-18 20:03:13 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 15 errata-xmlrpc 2012-06-20 13:13:59 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.

http://rhn.redhat.com/errata/RHBA-2012-0819.html


Note You need to log in before you can comment on or make changes to this bug.