Adding Security to a Web Application

Increase Web application security by adding security roles and constraints to your Web application.

  1. In the WorkSpace Navigator of the Web Application Development perspective, select web.xml.
  2. Select the Security tab.
  3. Click Add in the Security Roles section. A new role is added with the default name "NewSecurityRole x."
  4. (Optional) Change the default name to a unique, descriptive name in the Name field of the General Information section.
  5. (Optional) Enter a description.
  6. Expand the Security Constraints section.
  7. Click Add. A new constraint is added with the default name "NewSecurityConstraint x". General Information, Web Resource Collections, Authorize Roles and Constraints, and User Data Constraint sections appear.
  8. (Optional) Change the default name to a unique, descriptive name in the Display name field of the General Information section.
  9. In the Web Resource Collection section, to add a Web resource and its HTTP method:
    1. Click Add.
    2. (Optional) Enter a description.
    3. Select the HTTP method or methods that you want to use.
    4. Click Add to add URL patterns.
    5. Click OK.
  10. In the Authorize Roles and Constraints section, to add a role that is authorized to access a Web resource collection with a constraint:
    1. Click Edit. The Define Authorization Constraint dialog box appears.
    2. Type a description for the constraint.
    3. Select the Role Name that you want to restraint to apply to.
    4. Click OK.
  11. In the User Data Constraint section, to select a transport guarantee that is required between the client and the server for the security constraint:
    1. Click the arrow in the Type field to select the constraint. You can select None, Integral, or Confidential.
    2. (Optional) Enter a description for the constraint.
Related concepts
Configuring the web.xml File
Related tasks
Adding a Servlet to a Web Application
Adding a Filter to a Web Application
Adding a Resource Reference to a Web Application
Adding an EJB Reference to a Web Application
Adding a Context Parameter to a Web Application
Adding a Listener to a Web Application
Adding a Tag Library to a Web Application
Adding a Welcome File to a Web Application
Adding an Error Page to a Web Application
Adding MIME Mapping to a Web Application
Adding an EJB Local Reference to a Web Application
Adding a Resource Environment Reference to a Web Application
Adding an Environment Entry to a Web Application
Defining the Login Configuration of a Web Application

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.