Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 442187

Summary: [PATCH] support for providing console password in STDIN
Product: [Retired] 389 Reporter: Aleksander Adamowski <bugs-redhat>
Component: Directory ConsoleAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Chandrasekar Kannan <ckannan>
Severity: low Docs Contact:
Priority: low    
Version: 1.1.0CC: benl, yzhang
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-29 23:03:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 249650, 452721    
Attachments:
Description Flags
Patch against Console.java
none
ZIP with the compiled Console class
none
A better patch
none
Corrected patch
none
ZIP with the compiled class - latest version
none
cvs commit log none

Description Aleksander Adamowski 2008-04-12 15:10:40 UTC
Description of problem:

Currently the IDM console accepts an undocumented command line argument "-w
password", which allows for logging in to administration server without
interactive password prompt by supplying the plain text password on command line.

There's a serious security vulnerability here: the plain text password is
clearly visible to all other users of the system where the console runs, as its
arguments ca be read from the system's process table.

A much better approach would be to supply the password on standard input.

Implementing this was quite simple - I'm attaching a patch that implements the
option "-W" (that's inspired by the arguments to OpenLDAP's ldapsearch utility:
over there "-w" stands for password on the command line, "-W" is for password on
standard input. "-y filename" means password will be read from a file - it would
be a nice idea to implement that too).


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

Comment 1 Aleksander Adamowski 2008-04-12 15:10:40 UTC
Created attachment 302223 [details]
Patch against Console.java

Comment 2 Aleksander Adamowski 2008-04-12 15:15:10 UTC
Created attachment 302224 [details]
ZIP with the compiled Console class

For your testing convenience, I'm attaching a compiled version of the modified
class.

In order to use it, simply replace the Console class files in the
idm-console-mcc-1.1.0.jar JAR archive, they reside in JAR's subdirectory named
"/com/netscape/management/client/console/".

Comment 3 Aleksander Adamowski 2008-04-12 15:43:06 UTC
Created attachment 302225 [details]
A better patch

Another version of the patch:

1) in order to be consistent with FDS's ldapsearch argument naming conventions,
it uses "-w -" for reading password from standard input. FDS's ldapsearch
reserves "-W" for reading SSL certificate password.
2) implements the "-y" argument for reading password from a file
3) documents the (until now) undocumented options in the syntax help output
("-h").

Comment 4 Aleksander Adamowski 2008-04-12 15:52:50 UTC
Created attachment 302231 [details]
Corrected patch

I forgot to close the password file after I'm done with it. This should be the
final version.

Comment 5 Aleksander Adamowski 2008-04-12 15:55:04 UTC
Created attachment 302232 [details]
ZIP with the compiled class - latest version

Comment 6 Aleksander Adamowski 2008-06-23 22:48:17 UTC
How about checking this in? There's nothing more preventing the checkin AFAIK.

Comment 7 Rich Megginson 2008-06-23 23:03:32 UTC
Created attachment 310084 [details]
cvs commit log

Comment 8 Fedora Update System 2008-09-04 19:50:40 UTC
idm-console-framework-1.1.2-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/idm-console-framework-1.1.2-1.fc8

Comment 9 Fedora Update System 2008-09-04 19:51:28 UTC
idm-console-framework-1.1.2-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/idm-console-framework-1.1.2-1.fc9

Comment 10 Fedora Update System 2008-09-11 17:03:18 UTC
idm-console-framework-1.1.2-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2008-09-11 17:13:25 UTC
idm-console-framework-1.1.2-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Yi Zhang 2009-03-30 22:34:06 UTC
verified on rhel5 32bit & hp-ux
test result: pass 

pass means the following
1. no password being recorded in log files (including admin server access and error log file and dirsrv server access and error log file)
2. -w option still works fine

Comment 13 Chandrasekar Kannan 2009-04-29 23:03:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0455.html