This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 94954 - UserNameToken: secured WS can be accessed without valid username/password
Summary: UserNameToken: secured WS can be accessed without valid username/password
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Identity (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@serverplugins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-08 13:00 UTC by Andrey Yamkovoy
Modified: 2007-02-19 16:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Deployment output (3.89 KB, text/plain)
2007-02-08 13:03 UTC, Andrey Yamkovoy
Details
AS log (229.67 KB, text/plain)
2007-02-08 13:03 UTC, Andrey Yamkovoy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Yamkovoy 2007-02-08 13:00:56 UTC
Steps to reproduce:
- Create 1st Web Application with Web Service.
- Enable message level security for this WS using UserNameToken profile.
- Deploy the 1st Web Application.
- Create 2nd Web Application with Web Service Client for WS from 1st app.
- Create Servlet in 2nd web app and add in it the code to invoke some operation
of secured WS.
- Enable message level security for web service client using UserNameToken
profile (set some not valid username and password).
- Change the Web Service Client Security Configuration: just set the username
field empty.
- Deploy the 2nd web application and run the servlet (sometimes exception throws
in output but application deployed successfully).
- Notice that invocation of secured operation passed without any error.
- In AS log we can see that for invocation username 'testuser' was used but we
did not set this username.
Comment 1 Andrey Yamkovoy 2007-02-08 13:03:11 UTC
Created attachment 38234 [details]
Deployment output
Comment 2 Andrey Yamkovoy 2007-02-08 13:03:41 UTC
Created attachment 38235 [details]
AS log
Comment 3 Peter Liu 2007-02-08 22:41:20 UTC
I can't reproduce the problem.  The exception in the deployment log indicates
there is some issue connecting to the access manager.  The behaviour you saw
might be a side-effect of that.  

Please try to come up with a reproducible step for creating the exception you
saw in the deployment log.

Comment 4 Peter Liu 2007-02-09 22:40:20 UTC
It looks like the empty username corrupted the agent file for the client
under the amflatfiledir/amserver/idrepo/agent directory.  I think this is what
caused the exception at deployment time.  It also looks like the AM
authentication provider simply uses the default client agent file (wscWSC) which
contains the default testuser.

I'll file a bug against the access manager. Meanwhile, on our side, I'll append
an empty space to the empty username to plug the security leak.


Comment 5 Peter Liu 2007-02-09 22:45:59 UTC
Checked in a fix to prevent users from exploiting this security hole caused by
an empty username.

Comment 6 Andrey Yamkovoy 2007-02-19 16:45:43 UTC
Verified.