Category:OWASP Security Analysis of Core J2EE Design Patterns Project/BusinessTier
From OWASP
Middle and Integration Tier Security
The majority of Open Web Application Security Project (OWASP) Top 10 vulnerabilities occur in the presentation tier. While attacks do exploit vulnerabilities in the business and enterprise integration tiers, the attacks typically originate from presentation tier web pages. For example, a SQL injection payload is usually delivered as part of an HTTP request to a web page, but the exploit itself usually occurs in the integration tier.
We examine the business and integration tier patterns for security from two perspectives:
- Attacks originating from the presentation tier, such as a Cross-Site Scripting (XSS) attack sent by a malicious web client
- Attacks originating from the business and integration tiers, such as an unauthorized web service request to an integration tier device
The second perspective is important enough to warrant special attention. Many organizations ignore attacks originating from within the internal network. Unfortunately, the notion that organizations can completely trust insiders is flawed.In application security, developers sometimes argue that the process of launching an attack in the business or integration tiers is complicated and therefore less likely. As organizations increasingly adopt Service Oriented Architectures (SOA) in business and integration tiers with standards like Simple Object Access Protocol (SOAP) and Representation State Transfer (REST), security tools targeting these protocols are becoming readily available .
Even if you have not yet experienced an insider security incident, remember that insider attacks are on the rise and the systems you architect today may remain in production for years or even decades to come. Create secure applications by building-in protection from insider threats.
- Business Delegate
- Service Locator
- Session Façade
- Application Service
- Business Object
- Composite Entity
- Transfer Object
- Transfer Object Assembler
- Value List Handler
The Business Delegate serves as an abstraction of the business service classes of the business tier from the client tier. Implementing a business delegate effectively reduces the coupling between the client tier and business tier, and allows for greater flexibility and maintainability of the application code. The most significant benefit of this pattern is the capability to hide potentially sensitive implementation details of the business services from the calling client tier. Furthermore, a business delegate can effectively handle business tier exceptions (such as java.rmi.Remote exceptions) and translate them into more meaningful, application-level exceptions to be forwarded to the client.
Analysis
Use to Implement
Whitelist input validation
The DelegateProxyStrategy uses BusinessDelegate objects as simple proxies to underlying services. Each BusinessDelegate is business context specific and is therefore a good place to implement whitelist security input validation. Remember, however, that BusinessDelegate validation only applies to input originating from the presentation tier. You need to duplicate input validation functionality for all other channels that access the same business tier, such as web services.
Exception Handling
A property of sound exception management is the practice of throwing an exception that is meaningful to the target tier. For example, a JMSException caught by a business tier object should not be propagated to the client tier. Instead, a custom, application-level, exception should be sent to the client tier. BusinessDelegate can effectively perform this translation, intercepting service-level exceptions from the business tier and throwing application-level exceptions to the client tier. This practice helps protect implementation-level details of the business services from calling clients. Note that exceptions can occur within and across many tiers, and restricting exception handling logic to the BusinessDelegate alone is insufficient.
This category currently contains no pages or media.

