Server Handler for SQL Injection Protection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Web services, particularly those using SOA architecture, are vulnerable to SQL injection attacks due to the embedding of database query languages like SQL within message protocols such as SOAP, which can lead to unauthorized access and exposure of internal system structures.
Innovation Solution
Implementing a server-side handler that performs input validation and output validation on all messages exchanged between clients and services, checking for unwanted data and SQL-related exceptions, to prevent SQL injection attacks and protect the internal structure of the service and database.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a handler performs input validation and output validation on all messages, then security against SQL injection attacks is improved, but device complexity increases
Solution Approach 1:
The patent introduces a handler as an intermediary component between the client and the service. This handler intercepts all messages, performs input validation to detect SQL injection attempts, and performs output validation to prevent information leakage. By placing this security layer in the message flow path, the system achieves comprehensive protection without requiring modifications to the underlying service logic, thus improving security while managing complexity through a dedicated intermediary component.
2Reliability
If a handler checks all request messages and response messages for SQL injections, then security is improved, but processing time increases
Solution Approach 1:
The handler performs input validation on request messages before they are processed by the service, and performs output validation on response messages before they are sent to the client. By conducting these validation checks in advance (preliminary action), the system prevents malicious inputs from reaching the service logic and filters sensitive information before transmission, thereby maintaining security while optimizing the timing of validation operations to minimize processing delays.
3Ease of operation
If database error messages are returned to clients, then debugging capability is improved, but information security deteriorates
Solution Approach 1:
The patent inverts the traditional error handling approach by performing output validation on response messages to detect and filter sensitive information before it reaches the client. Instead of allowing database error messages to be directly returned (which would expose internal structures), the handler intercepts these messages, identifies sensitive content, and prevents their transmission. This inversion prioritizes information security while still maintaining operational functionality by blocking only the harmful error details.
Data Source
Figure 1A~1B
Figure 1C~2A
Figure 2
AI summary
The present description refers in particular to a computer-implemented method, a computer system, and a computer program product for input validation and output validation to prevent SQL injections. The computer-implemented method may comprise: receiving at a service (122) a request message from a client (110) over a network (130), wherein the service is located on a server; providing a handler (126) at the server; checking the request message at the handler using a first method before sending the request message to the service; and checking a response message at the handler using the first method before sending the response message to the client.