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 77603 - sun-web.xml does not allow to add <security-role-mapping> elements
Summary: sun-web.xml does not allow to add <security-role-mapping> elements
Status: RESOLVED INVALID
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 5.x
Hardware: Other Windows XP
: P3 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-09 04:34 UTC by unicode
Modified: 2006-06-23 09:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description unicode 2006-06-09 04:34:26 UTC
I am trying to add the following XML elements into sun-web.xml and I find that
the editor that opens this XML doesnt really support adding this

  <security-role-mapping>
    <role-name>CEO</role-name>
    <principal-name>smcneely</principal-name>
  </security-role-mapping>

  <security-role-mapping>
    <role-name>Admin</role-name>
    <group-name>director</group-name>
  </security-role-mapping>
Comment 1 Vince Kraemer 2006-06-09 04:55:52 UTC
Unless you have a security-role that has CEO as the role-name, the editor won't
let you create the mapping.  That is by design.  If you DO have a security-role
with the ame CEO, then you have found an issue...

Please provide more details
Comment 2 _ pcw 2006-06-09 06:29:01 UTC
Vince beat me to it.  But here's my comment anyway since I already typed it up.

For each security-role-mapping you want in sun-web.xml, you must _first_ add the
associated security-role entry in web.xml or via the @DeclareRoles annotation if
this is JavaEE5.

If by chance you are using JavaEE5 and the @DeclareRoles annotation and have
already declared roles for security-role-mappings you are looking for, it is
likely you have encountered issue 74924 which currently prevents the appearance
of annotation driven sun-web.xml counterparts such as the security-role-mapping
customizer.  In this case, you can work around the problem for now by declaring
the security roles in web.xml as you would for J2EE 1.4.
Comment 3 _ pcw 2006-06-23 09:18:44 UTC
Closing as invalid.  See comments above.