Home > Customizing the Security Architecture
Book Chapter:
EMAIL THIS LICENSING & REPRINTS

Customizing the Security Architecture

10 Jun 2003 | Addison-Wesley Professional Publishing Group

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

The following excerpt is from chapter 7, Customizing the Security Architecture, of Inside Java 2 Platform Security, Second Edition: Architecture, API Design and Implementation, written by Li Gong, Gary Ellison and Mary Dageforde, and published by Addison-Wesley Professional Publishing Group.


This chapter demonstrates ways to augment the security architecture. We explain how to develop custom implementations of the various security classes that support either extensibility or substitution mechanisms. We also describe the mechanics of implementing a custom Permission class, extending the function-ality of the SecurityManager class, implementing a custom Policy provider, and implementing a DomainCombiner interface.

7.1 Creating New Permission Types

Recall from Section 5.1 that J2SDK 1.2 introduced a new hierarchy of typed and parameterized access permissions, rooted by an abstract class, java.security.Permission. Other permissions are subclassed from either the Permission class or one of its subclasses and appear in relevant packages. For example, the FilePermission permission representing file system access is located in the java.io package. Other permission classes are:

  • java.net.SocketPermission for access to network resources
  • java.lang.RuntimePermission for access to runtime system resources, such as class loaders and threads
  • java.lang.PropertyPermission for access to system properties
  • java.awt.AWTPermission for access to windowing resources
    As this list illustrates, accesses to controlled resources, including properties and packages, are represented by the permission classes.

    Applications are free to add new categories of permissions. However, it is essential that, apart from official releases, no one extend the permissions that are built into the SDK, either by adding new functionality or by introducing additional keywords into a class such as java.lang.RuntimePermission. Refraining from doing this maintains compatibility. When creating a new permission, it is advisable also to declare the permission to be final. The rule of thumb is that if the permission will be granted in a security policy, it is probably best to declare it final. However, at times it may be necessary to create a class hierarchy for your custom permission. If this is the case, a couple of design heuristics are worth mentioning. First, if the abstract, or base, class of your permission or permission collection has a concrete implementation of the implies method, it is recommended that the implies method take the type of the permissions into consideration.

    Read the rest of this chapter.



    Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


    RELATED CONTENT
    Secure Software Development
    Vista functionality still wins over security
    Mozilla to release Firefox threat-modeling data
    Security issues found in the Spring Framework
    Software still plagued with security holes, researcher says
    Microsoft tools won't be quick fix for SQL injection attacks
    Which automated quality assurance tools can be used to test software?
    Gary McGraw on secure software development
    Product review: Mu-4000 Security Analyzer
    Product review: Klocwork Insight 8.0
    HP aims at IBM with application vulnerability scanning as service

    RELATED GLOSSARY TERMS
    Terms from Whatis.com − the technology online dictionary
    bypass  (SearchSecurity.com)
    Common Weakness Enumeration  (SearchSecurity.com)
    debugging  (SearchSoftwareQuality.com)
    fuzz testing  (SearchSecurity.com)
    heuristics  (SearchSoftwareQuality.com)
    sandbox  (SearchSecurity.com)
    threat modeling  (SearchSecurity.com)
    trigraph  (SearchSecurity.com)

    RELATED RESOURCES
    2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
    Search Bitpipe.com for the latest white papers and business webcasts
    Whatis.com, the online computer dictionary




  • Search Additional Security Research and Solutions
    Find Security Channel Research for Resellers and Partners
    TechTarget Security Media
    Information Security View this month\\'s issue and subscribe today.
    Information Security Decisions Apply online for free conference admission.
    SearchSecurity.com
    HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




    All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts