Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1064938 - A file URL cannot be set as a keystore or truststore URL values for JSSE
Summary: A file URL cannot be set as a keystore or truststore URL values for JSSE
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Installer
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER1
: 6.0.1
Assignee: Thomas Hauser
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-13 15:25 UTC by Ivo Bek
Modified: 2014-08-06 19:59 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 19:59:28 UTC
Type: Bug


Attachments (Terms of Use)
server.keystore (deleted)
2014-02-13 15:25 UTC, Ivo Bek
no flags Details

Description Ivo Bek 2014-02-13 15:25:50 UTC
Created attachment 862843 [details]
server.keystore

Description of problem:

When I try to set a file keystore URL (e.g. file:/home/ibek/work/jbossqe-installer/common/target/classes/jsse/server.keystore) for JSSE I get the following exception:

Exception in thread "Thread-8" java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
	at com.redhat.installer.util.KeystoreUtils.isValidAccessibleUrl(KeystoreUtils.java:117)
	at com.redhat.installer.util.KeystoreUtils.isValidKeystore(KeystoreUtils.java:34)
	at com.redhat.installer.validator.SecurityDomainValidator.validateData(SecurityDomainValidator.java:41)
	at com.izforge.izpack.installer.IzPanel.validatePanel(IzPanel.java:1242)
	at com.izforge.izpack.installer.IzPanel.panelValidated(IzPanel.java:434)
	at com.izforge.izpack.installer.InstallerFrame.navigateNext(InstallerFrame.java:1664)
	at com.izforge.izpack.installer.InstallerFrame.navigateNext(InstallerFrame.java:1649)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.navigate(InstallerFrame.java:1812)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.access$100(InstallerFrame.java:1779)
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler$1.run(InstallerFrame.java:1796)
	at java.lang.Thread.run(Thread.java:744)

password for the keystore is 123456

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


How reproducible:


Steps to Reproduce:
1. Run BRMS installer 6.0.0.GA
2. In the Configuration step, mark "perform additional configuration"
3. Mark "Add a security domain"
4. Skip the next page
5. Mark "Add jsse element"
6. Mark "Add keystore element"
7. Fill password "123456" and the keystore URL to your keystore (attached) file (it must start with file:/)

Actual results:


Expected results:


Additional info:

Comment 1 Thomas Hauser 2014-02-18 16:47:00 UTC
This is fixed in the latest build of the installer-commons. Note that the file URI must start with file:// and not just file:/ (using file:/ causes java's URI class to interpret the following path as an FTP URL when calling URI.toUrl(), for some reason.)

Comment 2 Andrej Podhradsky 2014-02-27 12:13:47 UTC
Verified with 6.0.1.ER1

It works with both URIs:
a) file:/home/...
b) file:///home/...


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