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

Summary: sun-web.xml does not allow to add <security-role-mapping> elements
Product: serverplugins Reporter: unicode <unicode>
Component: Sun Appserver 8Assignee: _ pcw <pcw>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: Other   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

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.