Bug 1019241 - Fix JNDI input validation.
Summary: Fix JNDI input validation.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Installer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: CR3
: EAP 6.2.0
Assignee: Miles Tjandrawidjaja
QA Contact: Petr Kremensky
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-15 11:09 UTC by Petr Kremensky
Modified: 2014-09-03 04:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:23:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Kremensky 2013-10-15 11:09:28 UTC
Description of problem:
 Currently the JNDI input fields must start with java:/ or java:jboss/ , but there is no validation for empty jndi names (eg. "java:/"). Creating datasource with such a name ends with IllegalArgumentException once we try to enable it.

Version-Release number of selected component (if applicable):
 EAP 6.2.0.ER5

How reproducible:
 always

Steps to Reproduce:
 1. Start gui installer, use default values until you get into Post-Install Configuration screen.
 2. Select to Install JDBC driver and Datasource
 3. On Datasource setup screen enter "java:jboss/" as JNDI Name
 4. Finish the installation

Actual results:
 No error dialog, installation will end successfully.

Expected results:
 Error dialog on Datasource screen.

Additional info:
 - There is another JNDI input field on Infinispan Configuration screen, fix also this please.
 - I'll create another BZ for domain management component, but we should cover this also on installer's side.
 - java.lang.IllegalArgumentException: Empty name segment is not allowed for jboss

Comment 1 Miles Tjandrawidjaja 2013-10-15 14:49:44 UTC
Validation has been added for JNDI input field for Datasource page and Infinispan Configuration screen.

http://git.app.eng.bos.redhat.com/jbossas-installer.git/commit/?h=eap-6.2

Comment 3 Petr Kremensky 2013-10-18 09:36:05 UTC
CLI actually trims the string so it ends like "java:/".

Comment 4 Miles Tjandrawidjaja 2013-11-18 19:41:23 UTC
"java:/ " and "java:/" both considered invalid.
CLI should not logner trim JNDI name.
This allows from something like "java:/ space "

According to http://docs.oracle.com/javase/jndi/tutorial/beyond/misc/policy.html the JNDI does not define any naming policy of its own.

http://git.app.eng.bos.redhat.com/jbossas-installer.git/commit/?h=eap-6.2&id=297bcd46da8123eae6344c27b6fd8d970536de4f

Comment 5 Petr Kremensky 2013-11-19 12:03:58 UTC
JNDI validation now works fine, but you accidentally removed it from Infinispan configuration panel, so it is working only for Datasource setup.

Comment 6 Miles Tjandrawidjaja 2013-11-19 16:35:31 UTC
Yes your right.
Added validation back in, also made sure spaces are retained.

http://git.app.eng.bos.redhat.com/jbossas-installer.git/commit/?h=eap-6.2

Comment 7 Petr Kremensky 2013-11-22 09:16:11 UTC
Verified on EAP 6.2.0.CR3 installer. JNDI validation is now working on all panels.


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