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

Summary: A file URL cannot be set as a keystore or truststore URL values for JSSE
Product: [Retired] JBoss BRMS Platform 6 Reporter: Ivo Bek <ibek>
Component: InstallerAssignee: Thomas Hauser <thauser>
Status: CLOSED CURRENTRELEASE QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: apodhrad, kverlaen, rrajasek
Target Milestone: ER1   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:59:28 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:
Description Flags
server.keystore none

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

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: cannot be cast to
	at com.redhat.installer.util.KeystoreUtils.isValidAccessibleUrl(
	at com.redhat.installer.util.KeystoreUtils.isValidKeystore(
	at com.redhat.installer.validator.SecurityDomainValidator.validateData(
	at com.izforge.izpack.installer.IzPanel.validatePanel(
	at com.izforge.izpack.installer.IzPanel.panelValidated(
	at com.izforge.izpack.installer.InstallerFrame.navigateNext(
	at com.izforge.izpack.installer.InstallerFrame.navigateNext(
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.navigate(
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.access$100(
	at com.izforge.izpack.installer.InstallerFrame$NavigationHandler$

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/...