Bug 1069252 - [QE] (6.3.0) add-user.sh is not working with cygwin
Summary: [QE] (6.3.0) add-user.sh is not working with cygwin
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Scripts and Commands
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: EAP 6.3.1
Assignee: Darran Lofthouse
QA Contact: Petr Kremensky
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks: 1072231
TreeView+ depends on / blocked
 
Reported: 2014-02-24 15:14 UTC by Petr Kremensky
Modified: 2014-07-09 00:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
In this release of JBoss EAP 6, the `add-user.sh` script will fail with an `IllegalStateException`. This bug presents when Java processes are executed in Cygwin becuase there is no java.io.Console available, meaning there is no API available to read a masked password. It is expected to be resolved in a future release of the product.
Clone Of:
: 1072231 (view as bug list)
Environment:
Last Closed: 2014-07-08 13:40:11 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1057625 None None None Never

Internal Links: 1057625

Description Petr Kremensky 2014-02-24 15:14:11 UTC
Description of problem:
Trying to use add-user.sh script with cygwin gives me IllegalStateException.

Version-Release number of selected component (if applicable):
 EAP 6.3.0.DR0

How reproducible:
 Always

Steps to Reproduce:
 1. use ./add-user.sh with cygwin

Actual results:
cygpath: can't convert empty path
Exception in thread "main" java.lang.IllegalStateException: JBAS015232: No java.io.Console available to interact with user.
	at org.jboss.as.domain.management.security.adduser.AddUser.<init>(AddUser.java:74)
	at org.jboss.as.domain.management.security.adduser.AddUser.main(AddUser.java:215)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.jboss.modules.Module.run(Module.java:292)
	at org.jboss.modules.Main.main(Main.java:455)

Expected results:
 Add-user dialogue will appear. 

Additional info:
 This one is continue of BZ1057625

Comment 1 Aleksandar Kostadinov 2014-02-24 15:42:34 UTC
duplicate of bug 1056130
see also bug 1057625 and bug 1027165

Comment 2 Permaine Cheung 2014-02-27 14:37:19 UTC
Darran, can you please look into it? Thanks!

Comment 3 Darran Lofthouse 2014-04-24 18:40:35 UTC
Investigating this one further the error message does actually appear to be correct, when Java processes are executed in cygwin there is no java.io.Console available to us - this means we have no API available to read a masked password.

One option could be to see if add-user can be ported to AESH which is already used by the CLI and has password masking capabilities, the problem however is that it would be too large a change to make into EAP 6.3 and as this error means cygwin has never worked I would be more inclined to class it as an RFE for that level of change.

However there is one pre-Java 6 solution that involves a second thread to mask the input, I am going to review if this can be combined with using a Scanner to mask input without needing the second thread.

http://www.cse.chalmers.se/edu/course/TDA602/Eraserlab/pwdmasking.html

But if that does not work at this time this issue may need a NACK.

Comment 5 Darran Lofthouse 2014-07-08 13:40:11 UTC
The changes required to achieve this are too large, if we want to add support for Cygwin it will need to be an RFE.

Comment 6 Scott Mumford 2014-07-09 00:20:50 UTC
Moving Target Release to 6.3.1 to ensure this gets picked up in the 6.3.0 Release Notes as a Known Issue.

Darran, if this has an impact on your workflow, feel free to change it back once the 6.3.0 GA docs have been published.


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