Bug 1043920 - Basic security on http binding failing
Summary: Basic security on http binding failing
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: kconner
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-17 12:55 UTC by Pavel Drozd
Modified: 2015-08-02 23:45 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Secured service with http binding does not require authentication header. This causes basic security failure as the service can be requested without security.
Clone Of:
Environment:
Last Closed: 2015-04-02 00:28:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
reproducer (13.62 KB, application/zip)
2013-12-17 12:55 UTC, Pavel Drozd
no flags Details
switchyard original (1.38 KB, text/xml)
2013-12-17 12:55 UTC, Pavel Drozd
no flags Details
switchyard ER6 (1.90 KB, text/xml)
2013-12-17 12:56 UTC, Pavel Drozd
no flags Details
switchyard ER7 (1.88 KB, text/xml)
2013-12-17 12:56 UTC, Pavel Drozd
no flags Details

Description Pavel Drozd 2013-12-17 12:55:07 UTC
Created attachment 837659 [details]
reproducer

Problem: Secured service with http binding does not require authentication header. 

The switchyard.xml (see switchyard-original.xml) defines the http binding on service "CustomService", component "Performance".

The bean scanner adds to the switchyard.xml new component named "CustomService" (The java bean defines annotation @Service(CustomService.class), so it is ok).

There is difference between switchayrd.xml generated in ER6 and ER7. 

The request to secured service published using switchyard.xml from previous version (ER6) requires authentication header, but the service published using switchyard.xml from ER7 does not, so the service can be requested without security.

ER6 switchyard:
the request to "http://localhost:8080/performance-binding-http-secured-basic/CustomService/sayHello" invokes the CustomService defined in Performance component, so it requires authentication.

ER7 switchyard:
the request to "http://localhost:8080/performance-binding-http-secured-basic/CustomService/sayHello" invokes the CustomService defined in new added CustomService component, so it does not require authentication. This is interesting, because the binding is defined for "Performance/CustomService"

switchyard-original.xml - original switchyard.xml
switchyard-ER6.xml - generated ER6
switchyard-ER7.xml - generated ER7

The reproducer attached.

Comment 1 Pavel Drozd 2013-12-17 12:55:43 UTC
Created attachment 837660 [details]
switchyard original

Comment 2 Pavel Drozd 2013-12-17 12:56:06 UTC
Created attachment 837661 [details]
switchyard ER6

Comment 3 Pavel Drozd 2013-12-17 12:56:27 UTC
Created attachment 837662 [details]
switchyard ER7

Comment 4 Keith Babo 2013-12-17 14:03:45 UTC
A few comments on this project:

1) If you already have your bean service defined in switchyard.xml, there's no point in using BeanScanner in your pom.xml to generate config.

2) If you really want to use BeanScanner for some reason, it's important to make sure that the config that will be generated from annotations in the bean class matches any predefined config in switchyard.xml.  In this case, that means adding the componentName element to your annotation:

@Service(value = CustomService.class, componentName = "Performance")

What's happening at runtime here is that two instances of 'CustomService' are registered, one for each component definition in the generated switchyard.xml.  The promoted service is also named 'CustomService' so it is going to match based on name and that will provide two possibilities. Deployment happens in document order, so that's likely why the first, unsecured service is being invoked with your app.

Comment 5 Rob Cernich 2014-10-21 15:05:05 UTC
Hey Kevin, I think this should be nack'd and marked as won't fix.

Comment 6 kconner 2015-02-10 23:20:25 UTC
nacking on behalf of dev given Keith's and Rob's comments


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