Feeds

Aspect-oriented programming and security

Working together

3 Big data security analytics techniques

What's next?

The potential uses for Aspect-oriented programming in application security are enormous. Here are a couple of other applications AOP in security:

  • Implement access control independently of application logic. Instead of having explicit checks such as checkAccess(User) in each sensitive function, you can achieve this through aspects and let developers focus on business logic
  • Implement application security policies such as explicitly forbidding programmers from calling dynamic SQL libraries (e.g. executeQuery()). Whenever that library is called, you can use aspects to throw an exception and record exactly where the offending call came from

Developers are already moving towards adopting AOP. JBoss, WebSphere, and WebLogic either have existing functionality to integrate AOP or have made announcements to do so in the future. Now the application security community needs to follow suit by providing guidance on how AOP can be used in a security context.

We can achieve this by ensuring we add AOP to our application security training curriculums (something we’ve included in our new class for SANS, and I hope other training companies do the same), do more research on how AOP works at securing applications in production (including benchmarks for performance impact), and providing more example code for developers to learn from.

Footnotes

  1. Aspect-oriented programming with Spring; Spring Framework
  2. Applying Aspect-Oriented Programming to Security; Viega, Bloch, and Chandra; Cutter IT Journal
  3. Towards a security aspect for Java; Farías, Andrés
  4. AspectJ
  5. AsjectJ Development Tools
  6. Using AspectJ with Spring Applications; Spring Framework Reference Guide
  7. Data Validation, OWASP,
          public class MyFirstClass {
          public void amethod (String bar) {
                    Logger.doLoggingBefore();
                    //business logic goes here
                    Logger.doLoggingAfter();
            }
          }
          public class MySecondClass {
            public void function (Object arg) {
                    Logger.doLoggingBefore();
                    //business logic goes here
                    Logger.doLoggingAfter();
            }
          }
          public aspect LogInterceptor { 
    
          public Object invoke(){
          Logger.doLoggingBefore();
                    method.execute(); 
                    Logger.doLoggingAfter();
              }
          }
          public class MySecondClass {
            public void function (Object arg) {
                    //business logic goes here
            }
          }
          public class MyFirstClass {
            public void amethod (String bar) {            
                    //business logic goes here
            }
    

This article originally appeared in Security Focus.

Copyright © 2007, SecurityFocus

SANS - Survey on application security programs

More from The Register

next story
OpenBSD founder wants to bin buggy OpenSSL library, launches fork
One Heartbleed vuln was too many for Theo de Raadt
Got Windows 8.1 Update yet? Get ready for YET ANOTHER ONE – rumor
Leaker claims big release due this fall as Microsoft herds us into the CLOUD
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Ubuntu 14.04 LTS: Great changes, but sssh don't mention the...
Why HELLO Amazon! You weren't here last time
Patch iOS, OS X now: PDFs, JPEGs, URLs, web pages can pwn your kit
Plus: iThings and desktops at risk of NEW SSL attack flaw
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Apple inaugurates free OS X beta program for world+dog
Prerelease software now open to anyone, not just developers – as long as you keep quiet
prev story

Whitepapers

Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Mainstay ROI - Does application security pay?
In this whitepaper learn how you and your enterprise might benefit from better software security.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.