Bug 1017655 - Web services configuration validation errors
Summary: Web services configuration validation errors
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Console
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER1
: EAP 6.4.0
Assignee: Heiko Braun
QA Contact: Pavel Jelinek
URL:
Whiteboard:
Depends On: 1027254
Blocks: 1176535
TreeView+ depends on / blocked
 
Reported: 2013-10-10 09:56 UTC by Petr Sakař
Modified: 2019-08-19 12:40 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous releases of JBoss EAP 6, invalid values for *WSDL Host*, *WSDL Port* and *WSDL Secure Port* under Profiles > Web > Web Services were not rejected by the web console. This issue has been resolved in this release which honors the validation rules from the management model. Incorrect values are no longer saved.
Clone Of:
Environment:
Last Closed: 2019-08-19 12:38:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Sakař 2013-10-10 09:56:22 UTC
Description of problem:
values user can enter are not correctly validated for wsdl host, wsdl port and wsdl secure port




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


How reproducible:
always

Steps to Reproduce: (every case starts with *)

* WSDL port - set to zero - user can save the form, but Uknown error appears at the upper left corner, user has to click it otherwise can not continue 

Internal Server Error
{
    "outcome" => "failed",
    "result" => {
        "step-1" => {
            "outcome" => "failed",
            "rolled-back" => true
        },
        "step-2" => {
            "outcome" => "failed",
            "failure-description" => "JBAS014708: 0 is an invalid value for parameter wsdl-port. A minimum value of 1 is required",
            "rolled-back" => true
        }
    },
    "failure-description" => {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => "JBAS014708: 0 is an invalid value for parameter wsdl-port. A minimum value of 1 is required"}},
    "rolled-back" => true,
    "response-headers" => {"process-state" => "reload-required"}
}

from now on 0 is displayed as port value


* WSDL port - set to big number 9876543210987654, user is informed operation was successfull, but value is not changed

* WSDL host - set to wrong host name (eg. asjlk@$#@$@#123321"""FGS::::::fsdgfd), form is saved, no error issued, value not changed

* WSDL host - set to ${jboss-safsafsafasf-*} - internal error

Unknown error

Unexpected HTTP response: 500

Request
{
    "operation" => "composite",
    "address" => [],
    "steps" => [{
        "address" => [("subsystem" => "webservices")],
        "operation" => "write-attribute",
        "name" => "wsdl-host",
        "value" => expression "${jboss-safsafsafasf-*}"
    }]
}

Response

Internal Server Error
{
    "outcome" => "failed",
    "result" => {"step-1" => {
        "outcome" => "failed",
        "failure-description" => "JBAS014802: Cannot resolve expression 'expression \"${jboss-safsafsafasf-*}\"' -- java.lang.IllegalStateException: Failed to resolve expression: ${jboss-safsafsafasf-*}",
        "rolled-back" => true
    }},
    "failure-description" => {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS014802: Cannot resolve expression 'expression \"${jboss-safsafsafasf-*}\"' -- java.lang.IllegalStateException: Failed to resolve expression: ${jboss-safsafsafasf-*}"}},
    "rolled-back" => true,
    "response-headers" => {"process-state" => "reload-required"}
}


* WSDL host - set to ${jboss.bind.address:*} - internal error reported

Actual results:
user can save form with invalid values

Expected results:
user can not save form with invalid value of port (0)
if user saves form with invalid hostname, error is reported
internal errors related to entered values or their format are converted and presented

Additional info:

Comment 1 Harald Pehl 2013-10-25 11:13:35 UTC
Setting this from high to medium as no real harm is caused by the invalid input. 

To address this, we're working on a more general approach, which will take the validation rules from the management model into account. Once in place all forms will benefit from that.

Comment 2 Petr Sakař 2013-11-22 07:52:09 UTC
@Harald If you are clearing the flag can you please comment why the issue does not require to be documented when it is not fixed for GA ?

Comment 3 Harald Pehl 2013-11-22 10:24:04 UTC
Sorry Petr, you're right. Added a value for "Doc Text"

Comment 4 Scott Mumford 2013-12-02 01:59:41 UTC
Modified Doc Text content and marked for inclusion in the 6.2 Release Notes document.

Comment 5 Petr Sakař 2014-02-28 12:52:27 UTC
Verified all described cases are fixed for EAP-6.3.0.DR1

Comment 6 Petr Sakař 2014-02-28 13:00:10 UTC
Execuse me for mistake - validation is still not working property (it fails with unknown error) Though situation is better because values are not saved anymore, so user can not save form with invalid values

Comment 8 Jakub Cechacek 2014-07-16 11:50:25 UTC
Moving to 6.4 as the issue is still valid for 6.3

In general this issue is related to BZ1027254

Comment 9 Pavel Jelinek 2014-11-26 09:30:41 UTC
Should this still remain in POST state?

Comment 10 Jakub Cechacek 2014-12-09 11:55:58 UTC
WSDL host field is still missing validation in 6.4.DR12

Comment 11 Harald Pehl 2014-12-17 11:56:11 UTC
What kind of validation error? According to /subsystem=webservices:read-resource-description wsdl-host is nilable and not required. So setting the host in the console to an empty string will set the wsdl-host to undefined.

Comment 12 Pavel Jelinek 2014-12-18 12:39:24 UTC
Regarding ports you are correctly not allowed by client to save values outside "min" => 1L, "max" => 2147483647L. 
But regarding WSDL Host you are not warned by the client if you enter invalid hostname (e.g. asjlk@$#@$@#123321"""FGS::::::fsdgfd from the bug description), there is just Unknown error in messages and value seems saved until you leave and come back to #webservices page or refresh the browser.

Comment 13 Harald Pehl 2014-12-19 08:49:26 UTC
We do not provide a special validator for WSDL hosts. However I fixed the issue that the erroneous wsdl host is not replaced by the original host after a server side error.

Comment 14 Pavel Jelinek 2015-01-14 15:55:55 UTC
Verified for EAP 6.4.0.ER1


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