Feeds

Aspect-oriented programming and security

Working together

Internet Security Threat Report 2014

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

Internet Security Threat Report 2014

More from The Register

next story
Euro Parliament VOTES to BREAK UP GOOGLE. Er, OK then
It CANNA do it, captain.They DON'T have the POWER!
Download alert: Nearly ALL top 100 Android, iOS paid apps hacked
Attack of the Clones? Yeah, but much, much scarier – report
NSA SOURCE CODE LEAK: Information slurp tools to appear online
Now you can run your own intelligence agency
Post-Microsoft, post-PC programming: The portable REVOLUTION
Code jockeys: count up and grab your fabulous tablets
Twitter App Graph exposes smartphone spyware feature
You don't want everyone to compile app lists from your fondleware? BAD LUCK
Microsoft adds video offering to Office 365. Oh NOES, you'll need Adobe Flash
Lovely presentations... but not on your Flash-hating mobe
prev story

Whitepapers

10 ways wire data helps conquer IT complexity
IT teams can automatically detect problems across the IT environment, spot data theft, select unique pieces of transaction payloads to send to a data source, and more.
Getting started with customer-focused identity management
Learn why identity is a fundamental requirement to digital growth, and how without it there is no way to identify and engage customers in a meaningful way.
How to determine if cloud backup is right for your servers
Two key factors, technical feasibility and TCO economics, that backup and IT operations managers should consider when assessing cloud backup.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Mitigating web security risk with SSL certificates
Web-based systems are essential tools for running business processes and delivering services to customers.